"Getting Started with Vox"

Getting Started with Vox

This guide takes you from zero to a running full-stack app in under 5 minutes.

Prerequisites

Before you begin, make sure you have:

  • Rust (1.81+) — Install
  • Node.js (20+) — Install
  • pnpm (9+) — npm install -g pnpm

Tip: Run vox doctor to check all dependencies and environment variables are configured correctly.

Step 1: Install Vox

# Mac/Linux unified install
curl -fsSL https://raw.githubusercontent.com/vox-foundation/vox/main/scripts/install.sh | bash -s -- --install
# Windows (PowerShell) install
irm https://raw.githubusercontent.com/vox-foundation/vox/main/scripts/install.ps1 | iex

Step 2: Create a New Project

Use the Vox CLI to scaffold a new application:

vox init my-app
cd my-app

This scaffolds a complete project structure containing a src/main.vox entrypoint.

Step 3: Explore the Generated Code

Open src/main.vox. You'll see a starter app that includes a database table, a server endpoint, an interactive UI component, and a routing block.

@table type Note {
    title: str
    content: str
}

@server fn health() -> Result[str] {
    ret Ok("ok")
}

component App() {
    view: <div>"Hello Vox"</div>
}

routes {
    "/" to App
}

Step 4: Type Check

Run a fast static analysis and type check:

vox check src/main.vox

Step 5: Build

Compile the application to its backend Rust crate and frontend TypeScript components:

vox build src/main.vox -o dist

You'll see step-by-step progress indicating lexical analysis and code generation.

Step 6: Run

Run the generated binary directly:

vox run src/main.vox

Open http://localhost:3000 in your browser to view the application.

Key Concepts

DecoratorWhat it doesResulting Output
@tableDefines a database tableRust types + Codex migrations
@server fnDefines an API endpointAxum handler + TS service
@islandCreates an interactive UIReact component (Vite)
@query fnRead-only db operationOptimized SQL query fn
@mutation fnWrite-enabled db operationSQL insert/update fn
@mcp.toolExposes logic to agentsMCP Tool Definition
workflowDurable async processLogged process (Populi)
activityRetriable workflow stepBound worker (Vox-Dei)

What's Next?