Quickstart
Start in an Empty Directory
Install the Void CLI from npm:
npm
npm install -D voidpnpm
pnpm add -D voidyarn
yarn add -D voidbun
bun add -D voidIn an empty directory, void init adds the matching Pages adapter and starter dependencies after you choose a framework.
As part of void init, you'll choose a Pages framework (React, Vue, Svelte, or Solid) and a starter type. D1 is the default top option and scaffolds a DB-backed page loader, schema, generated migration, db/seed.ts, and API route. PostgreSQL scaffolds the same starter and writes "database": "pg" to void.json. Static Pages skips the database and server starter files so you can start with static content and add Void features later.
After installation, run the setup flow:
npx void initpnpm void inityarn void initbunx void initAt the end of the full interactive flow, void init can also handle Void project setup by logging you in and linking or creating your Void project. That means the default first-time path is install packages, run void init, then void deploy.
For the database-backed starters, D1 is the zero-config default for prototyping and read-heavy apps, while PostgreSQL is better when you already have Postgres infrastructure or need heavier writes and more complex queries.
💡 Notes on void binary usage
void is a local binary from the installed void package, so outside of npm scripts, you will have to invoke it with npx, pnpm, yarn, or bunx. For brevity, you will sometimes see unprefixed void usage throughout the docs. Just remember it needs to be invoked through a binary runner.
Alternatively, you can add ./node_modules/.bin to your PATH so that you can invoke void directly when you are in the root directory of your app.
⚠️ Prefer local install
We do not recommend installing void globally, because the CLI needs to be in sync with same version of the runtime framework. Always install void locally as a dev dependency of your project.
Using with Coding Agents
void init detects your agent once and reuses that choice for instructions, skills linking, and MCP config.
If auto-detection fails, void init asks you to choose from a short list (Claude, Cursor, Codex, Gemini CLI, Generic).
In supported agents such as Claude Code, you can invoke the /void skill to turn your agent into a Void export. Then, simply ask the agent to build an app with Void. See the Coding Agents guide for more details.
Meta Frameworks
Void as a platform supports Vite-based meta frameworks, but the Void SDK itself is also a powerful and flexible meta framework via its Pages routing feature. If you only want to use an existing meta framework and deploy to Void, check out the Framework Integration Guides.
Adding to an Existing Vite App
npm install -D voidpnpm add -D voidyarn add -D voidbun add -D voidEnable the plugin in vite.config.ts
import { defineConfig } from 'vite';
import { voidPlugin } from 'void';
export default defineConfig({
plugins: [voidPlugin()],
});Then run the setup guide via void (Void CLI):
npx void initpnpm void inityarn void initbunx void initOnce You Have a Working App
1. Edit the generated API route
Your starter already includes routes/api/hello.ts with a named GET export:
import { defineHandler } from 'void';
export const GET = defineHandler(() => {
return { message: 'Hello from Void' };
});2. Run locally
npm run devThen visit:
- App:
http://localhost:5173 - API route:
http://localhost:5173/api/hello
3. Finish Void project setup if you skipped it during void init
void auth loginIf you already logged in and linked a project during void init, you can skip this step.
4. Deploy
Set secrets once before deploying, if any:
void secret put KEY=valueThen run:
void deploy┌ void deploy
│
◇ Building...
│ (vite build output)
│
ℹ Found N migration(s)
│
◇ Checking assets...
◇ Uploading X/Y assets (Z cached)
◇ Packaging...
◇ Deploying...
◇ Deployed!
│
│ ╭─────────────────────────────────────────╮
│ │ https://my-app.void.app │
│ │ │
│ │ 2 worker module(s), 5 static asset(s) │
│ │ 1 migration(s) applied │
│ │ SSR enabled │
│ ╰─────────────────────────────────────────╯
│
└ Done!On first deploy, Void will:
- build your app
- create or link a project if you did not already do that during
void init - provision required resources (for example D1/KV/R2 when inferred)
- deploy to
https://<slug>.void.app
Right now, only deploys via the CLI is supported. To setup push-to-deploy GitHub, run void init --github.
Next steps
- To understand what kind of apps are supported: Supported App Types
- Server Routing: dynamic params, middleware, and validation
- Database: queries, migrations, and generated types
- Type Safety: end-to-end typed fetch client