Skip to content

Scripts

The conventions live in Conventions. This page is the lookup for what each script does.

ScriptWhat it does
bun run devHot-reload server (src/server.ts)
bun run startSame without --hot
bun run okcheck + test:unit — nothing is finished until this is green
bun run checkTypes → lint → format:check → docs:check (scripts/check.ts)
bun run formatPrettier write
bun run cli …Operational commands — see App CLI
bun run cli doctorIs this checkout able to run, and what fixes it
bun run new-resource …Scaffold a resource — see new-resource

check prints which step failed and the fix (Run bun run format, Run bun run docs, and so on).

Terminal window
bun run check --json

The same facts as one record — {ok, durationMs, failed, steps: [{step, ok, fix, output, durationMs}]} — for whoever is reading with a program rather than with their eyes. The human output is untouched by the flag, and the exit code is the same either way: a contract that changed with the output format would be a trap.

bun run ok --json does not work, and cannot: ok is check && test:unit, and bun run appends the argument to the end of that chain, where it reaches bun test instead. Call bun run check --json and bun run test:unit separately.

ScriptWhat it does
bun run test:unitSKIP_MIGRATIONS=true bun test tests/unit — no Postgres
bun run test:dbdb:apply, then the full suite with SKIP_MIGRATIONS=true
bun run testbun test (everything under tests/)

Migrations are applied only via db:apply, never on import — see Database.

ScriptWhat it does
bun run db:applyApply migrations (src/db/migrate.ts)
bun run db:generatedrizzle-kit generate from the schema
bun run db:up / db:downDocker Compose for local Postgres
ScriptWhat it does
bun run css / css:watchTailwind → public/app.css
bun run docs / docs:checkRegenerate or verify docs/reference.md

See CSS and Generated reference.md.