CLI Workflow
Create and Generate
Use `create-vista-app` for fast project bootstrap, then add new modules with a repeatable CLI-driven workflow.
Updated: 2026-03-04
Bootstrap App
bash
npx create-vista-app@latest
cd my-vista-app
npm run devIn interactive mode, create-vista-app now prompts for:
- engine: default or flashpack
- package manager: npm, pnpm, yarn, or bun
Dependencies install automatically by default after scaffold. Use --skip-install when you only want the files without downloading packages yet.
To choose the Rust-first engine during scaffold:
bash
npx create-vista-app@latest my-vista-app --engine flashpackTo pick a package manager explicitly without the prompt:
bash
npx create-vista-app@latest my-vista-app --package-manager pnpmShortcut flags also work:
- --npm
- --pnpm
- --yarn
- --bun
Generated apps always keep the same scripts:
- npm run dev
- npm run build
- npm run start
The selected engine is stored in vista.config.ts, so switching engines later is a config change instead of a script rename.
Generate commands
bash
vista g api-init
vista g router <name>
vista g procedure <name> [get|post]
vista g agent <name>
vista g authvista g auth writes auth.ts, the catch-all auth route, /signin, /account, fail-closed middleware.ts, a SessionProvider wrapper, and .env.example. Set AUTH_SECRET before signing in. Credentials sign-in POSTs; OAuth keeps callbackUrl.
Typed Starter
Typed starter scaffolds app/api/typed.ts, app/api/routers, and app/api/procedures so your API contract starts strongly typed from day one.
Suggested Team Workflow
- Create feature route in app/<feature>/ first.
- Extract shared UI into components/ only after second reuse.
- Add server logic in app/api/procedures/ and expose from router.
- Keep release scripts in package.json so CI and local run identical commands.