The CLI

Every caldera command, by what it's for.

Each app has the caldera command as a dependency. Run it through your package manager (pnpm exec caldera …, npx caldera …) or the app's scripts (pnpm dev, pnpm test). Every command takes --help, and --json for machine-readable output (the default when its output isn't a terminal).

While you work

CommandWhat it does
caldera devRuns the app and Vite, and keeps the generated types current as you edit.
caldera generateWrites the typed registries in .caldera/ (routes, pages, config, models…) and the lists in AGENTS.md.
caldera checkFails if generated files or the auth schema are out of date, or the app is misconfigured for its target. Run it in CI.
caldera mcpServes the app to coding agents over MCP: introspection, logs, recent errors, read-only SQL.

Generators

Each writes a file where it belongs, then regenerates the types. --force replaces an existing file; caldera stub:eject <name> copies a generator's template into stubs/ so it uses yours.

CommandMakes
make:model <Name>A model and its table (--no-table for an existing one).
make:routes <name>A route group in src/routes/.
make:page <Path/Name>A page in resources/pages/, e.g. Posts/Index.
make:policy <Name>A policy, denying everything until you allow it.
make:job <Name>A queued job.
make:event <Name>An event (--channel <Name> also sends it to browsers on that channel).
make:listener <Name> --event <Event>A listener for an event.
make:schedule <Name> --job <Job>A schedule that dispatches a job.
make:mail <Name>A mail (React Email).
make:notification <Name>A notification and its mail; billing.InvoicePaid gives it the id billing.invoice-paid.
make:channel <Name>A realtime channel (--presence for one that knows who's on it).
make:config, make:provider, make:factory, make:seederA config file, a provider, a factory or a seeder.

The database

CommandWhat it does
db:generateWrites a migration for what changed in your tables (--name add-notes names it).
db:migrateApplies pending migrations.
db:pushPushes the schema straight to the database, for prototyping.
db:seedRuns the seeders, dependencies first, in one transaction.
db:schemaDescribes every table: columns, relations and models.
model:show <Name>Shows a model: columns, relations, scopes, hooks.
auth:schemaRewrites the auth tables after you change Better Auth's plugins.
queue:table, cache:table, notifications:tableAdd the tables for the database queue, cache store and notification inbox.

Commands that change a database refuse to run against production without --force.

Inspecting the app

CommandWhat it shows
describeThe env schema, config (secrets redacted), providers and services.
route:listEvery route: its name, middleware and input schemas.
abilitiesEvery policy ability, and the routes each one guards.
broadcast:listRealtime channels (who may join) and the events sent on them.
broadcast:authorize <channel> --user <id>Whether someone may join a channel, and why.
schedule:listSchedules and their next run.
i18n:missingMissing, extra and mismatched translations, and unused keys.

Running in production

CommandWhat it does
queue:workProcesses queued jobs until stopped (pnpm worker).
queue:failed, queue:retry, queue:forgetLists, retries or deletes failed jobs (database queue).
schedule:workDispatches due schedules every minute (pnpm scheduler).
schedule:runDispatches this minute's schedules once, for an OS crontab.
schedule:syncWrites the platform's cron config (Vercel or Cloudflare) from your schedules.
broadcast:serveRuns the realtime server (pnpm realtime).

Deploying

CommandWhat it does
vercel:setupAdds vercel.json and the function entry point.
vercel:buildGenerates, then bundles the app for Vercel (its build command).
cloudflare:setupAdds wrangler.json and the Worker entry point (D1, R2, Queues, Email, Cron).
d1:migrationsCopies migrations to migrations/ for wrangler d1 migrations apply.

On this page