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:
Tip: Run
vox doctorto 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
| Decorator | What it does | Resulting Output |
|---|---|---|
@table | Defines a database table | Rust types + Codex migrations |
@server fn | Defines an API endpoint | Axum handler + TS service |
@island | Creates an interactive UI | React component (Vite) |
@query fn | Read-only db operation | Optimized SQL query fn |
@mutation fn | Write-enabled db operation | SQL insert/update fn |
@mcp.tool | Exposes logic to agents | MCP Tool Definition |
workflow | Durable async process | Logged process (Populi) |
activity | Retriable workflow step | Bound worker (Vox-Dei) |
What's Next?
- Golden Examples — Strictly verified code snippets
- Language Reference — Full syntax reference
- Building Agents — Build MCP tools and agents
- Deployment Guide — Production rollout