Skip to content

CLI

CLI reference

Every vukem command with its usage, arguments, flags, defaults, environment variables, files written, errors and real examples, in the style of a man page.

Last updated:

This is the manual for the vukem command. It lists every command, every flag, what each one writes to disk, the errors you may hit and how to fix them. Each command has a one-line purpose, a usage line, arguments, flags, and two examples: a realistic one and an advanced one. All output shown was captured from the real command.

For a guided tour with explanations and analogies, read the CLI overview. Use this page when you already know what you want and need the exact syntax.

You will find:

  • A cheat sheet of all commands
  • The global flags, environment variables and exit codes
  • Common workflows, end to end
  • Links to one reference page per command group

Command cheat sheet#

Commands marked global run in the vukem binary and work on files. Commands marked app run inside your project's cmd/app binary: vukem builds it and passes the arguments through (how delegation works).

CommandKindOne-liner
vukem newglobalCreate a project from the embedded starter
vukem serveglobalRun the app in development and restart it on changes
vukem buildglobalBuild the assets and the production binary
vukem versionglobalPrint the CLI version
vukem listglobalList the commands
vukem install:authglobalAdd login, registration, password reset, verification
vukem install:apiglobalAdd API tokens, /api/v1, CORS, rate limiting
vukem install:adminglobalAdd the admin panel at /admin
vukem install:flagsglobalAdd feature flags
vukem install:billingglobalAdd Stripe subscriptions
vukem install:inertiaglobalTurn the HTMX starter into an Inertia app
vukem boost:installglobalAdd guidelines and an MCP server for AI agents
vukem make:controllerglobalCreate a controller
vukem make:modelglobalCreate a model, optionally with migration, factory, controller
vukem make:migrationglobalCreate a timestamped migration and register it
vukem make:middlewareglobalCreate an HTTP middleware
vukem make:requestglobalCreate a validated request struct
vukem make:commandglobalCreate an app command and register it
vukem make:providerglobalCreate a provider and register it
vukem make:resourceglobalCreate an API resource (JSON transformer)
vukem make:factoryglobalCreate a model factory
vukem make:seederglobalCreate a seeder and register it
vukem make:eventglobalCreate an event type
vukem make:listenerglobalCreate an event listener and register it
vukem make:jobglobalCreate a queued job and register its handler
vukem make:mailglobalCreate a mailable and its view
vukem make:policyglobalCreate an authorization policy and register it
vukem make:admin-resourceglobalCreate an admin panel resource for a model
vukem make:testglobalCreate a test that uses the fluent client
vukem make:protoglobalCreate a gRPC service .proto and buf files
vukem codegen:rpcglobalGenerate Go and connect-go code from proto/
vukem key:generateglobalWrite a new APP_KEY to .env
vukem key:rotateglobalReplace APP_KEY and keep the old one
vukem downglobalPut the app in maintenance mode
vukem upglobalLeave maintenance mode
vukem migrateappRun pending migrations
vukem migrate:rollbackappRoll back the last batch or N migrations
vukem migrate:resetappRoll back every migration
vukem migrate:freshappDrop all tables and migrate again
vukem migrate:statusappShow which migrations ran
vukem db:seedappRun the seeders
vukem db:wipeappDrop every table
vukem route:listappList the registered routes
vukem aboutappShow the application and environment summary
vukem queue:workappProcess queued jobs
vukem queue:failedappList failed jobs
vukem queue:retryappRe-queue failed jobs
vukem queue:forgetappDelete failed jobs
vukem schedule:runappRun the scheduled tasks that are due now
vukem schedule:workappRun the scheduler in the foreground
vukem schedule:listappList the tasks and their next run
vukem cache:pruneappDelete expired database cache entries
vukem session:pruneappDelete expired database sessions
vukem openapi:exportappPrint the OpenAPI 3.1 document
vukem openapi:serveappPreview the API reference locally (opt-in)
vukem codegen:typesappGenerate TypeScript types and Zod schemas
vukem codegen:routesappGenerate typed frontend routes
vukem codegen:clientappGenerate a typed API client in TypeScript or Go
vukem ssr:startappRun the Inertia SSR server and restart it on crash
vukem ssr:checkappCheck that the SSR server answers /health
vukem boost:mcpappMCP server for coding agents (started by agents)
vukem <your command>appCommands you add with vukem make:command

Global flags#

These work on the vukem binary itself, before any command.

FlagWhat it does
-h, --help, help, listPrint the command list. Same as running vukem with no arguments.
help <command>Print the usage line, description and flags of one global command. It exits 2 for an unknown name.
<command> -hSame as help <command>. For an app command it prints the flags of that command only.
-v, --version, versionPrint vukem <version>. A build from a checkout prints devel.

Per-command rules:

  • Flags use Go's flag package: -force and --force are the same. --event=X and --event X are the same.
  • On global commands flags may come before or after the arguments: vukem make:model Comment -m equals vukem make:model -m Comment.
  • On app commands flags must come before positional arguments. db:seed is the exception: it reads seeder names first, then flags.
  • -- ends flag parsing.
  • Boolean flags do not combine: write -m -f -c, not -mfc.
  • There is no --env, --quiet or --no-color flag. Output is plain text with no colour.

Environment variables#

The global CLI reads almost nothing from the environment:

VariableRead byEffect
PATHallFinds go, git, npm, bun, pnpm, yarn, buf, protoc, node
CGO_ENABLEDbuild, delegated buildsA value you set wins; otherwise builds run with CGO_ENABLED=0

Everything else is read by your app, from the process environment or the .env file in the project root. The ones the CLI commands rely on:

VariableDefaultUsed by
APP_ENVdevelopmentDestructive commands need -force when it is production
APP_DEBUGfalseMust be false when APP_ENV=production, or every app command fails to boot
APP_KEYnoneSessions and encryption. Written by key:generate, new
APP_PREVIOUS_KEYSnoneOld keys kept by key:rotate
HOST, PORTlocalhost, 3000serve, about
DATABASE_URLfile:storage/database.sqlitemigrate*, db:*
QUEUE_CONNECTION, QUEUE_NAMES, QUEUE_CONCURRENCYsync, default, 4queue:*
SCHEDULE_TIMEZONEUTCschedule:*
OPENAPI_PREFIXnoneDefault for -prefix in openapi:export and codegen:*
SHUTDOWN_TIMEOUT15sHow long queue:work waits for running jobs after Ctrl+C

See Configuration for the full list.

Exit codes#

CodeMeaning
0Success
1Failure. The message starts with error: for global commands.
2Usage error: unknown command, missing or extra argument, bad flag value. Global commands also print Run 'vukem list' for the available commands.

A delegated app command returns its own exit code unchanged. A bare vukem <unknown> is delegated too, so inside a project it prints the app's command list and exits 2.

How commands are found#

  1. If the name is a global command, vukem runs it.
  2. Otherwise vukem builds cmd/app into .vukem/bin/app and runs it with the same arguments, standard streams and environment. It rebuilds only when a .go, .templ, go.mod, go.sum or .buildtags file is newer than the binary.
  3. Outside a project you get unknown command "migrate" (app commands need a Vukem project with cmd/app).

You may skip step 2 and run the binary yourself: go run ./cmd/app migrate.

Common workflows#

New API project#

Terminal
vukem new shop --api --module github.com/acme/shop
cd shop
vukem migrate
vukem serve
Text
Migrated: 20260101000000_create_posts_table
Migrated: 20261024221606_create_users_table
Migrated: 20261024221607_create_auth_tables

Then curl localhost:3000/up answers {"status":"ok"}. Check the routes with vukem route:list.

Add a resource end to end#

A Comment that belongs to the blog:

Terminal
vukem make:model Comment -m -f -c
vukem make:request StoreComment
vukem make:policy Comment
vukem make:test Comments
vukem migrate

Fill the migration, the model fields and the controller, register the routes in routes/, then run go test ./.... For an API, use make:resource Comment for the JSON shape and vukem codegen:client for a client. See reference: make.

Seed and migrate#

Terminal
vukem make:seeder Post
vukem migrate:fresh
vukem db:seed

migrate:fresh drops every table and migrates again, db:seed fills them. In production add -force on purpose and only after reading the guard.

Build for production#

Terminal
vukem codegen:types -prefix /api -o resources/js/types.ts
vukem build -o bin/shop
export APP_ENV=production APP_DEBUG=false MAIL_MAILER=log
./bin/shop migrate
./bin/shop

vukem build runs templ generate and vite build when the project has them, then go build -trimpath -ldflags="-s -w" with CGO_ENABLED=0. The binary contains every app command, so a server without the vukem CLI still runs ./bin/shop migrate. In production the app refuses to boot without MAIL_MAILER (smtp, resend, mailtrap or log). See Single binary.

Reference pages#