Skip to content

aerostack init

Scaffold a new Aerostack project with your choice of template and database.

Terminal window
aerostack init [project-name] [flags]

Running without arguments launches an interactive prompt.

FlagDefaultDescription
-t, --templateinteractiveStarter template (see list below)
--dbinteractiveDatabase type: d1 or neon
--devfalseStart aerostack dev immediately after init
TemplateDescription
blankEmpty project, no routes
apiREST API with typed routes and D1
api-neonREST API backed by Neon Postgres
multi-funcMulti-service project (API + background worker)
cron-neonScheduled cron job with Neon Postgres
webhook-neonWebhook receiver with Neon Postgres
ws-chatWebSocket chat with Durable Objects
ws-chat-neonWebSocket chat with Neon persistence
ws-voice-agentReal-time voice AI agent
ws-multiplayer-gameMultiplayer game with Durable Objects
ai-streamAI streaming API with SSE
Terminal window
# Interactive
aerostack init
# Named project with a specific template
aerostack init my-backend --template api --db d1
# Start dev server immediately after setup
aerostack init my-app --template ws-chat --dev
# Neon Postgres backend
aerostack init my-app --template api-neon --db neon
  1. Creates the project directory with src/, migrations/, shared/, and config files
  2. Generates aerostack.toml with your project configuration
  3. Runs npm install and pins all dependencies to latest versions
  4. If --dev is set, starts the local dev server automatically
my-app/
├── aerostack.toml # Project config (Aerostack equivalent of wrangler.toml)
├── src/
│ └── index.ts # Main entry point
├── migrations/ # SQL migration files
├── shared/ # Shared utilities (importable as @shared/*)
├── package.json
└── tsconfig.json