Scripts
The conventions live in Conventions. This page is the lookup for what each script does.
Day to day
Section titled “Day to day”| Script | What it does |
|---|---|
bun run dev | Hot-reload server (src/server.ts) |
bun run start | Same without --hot |
bun run ok | check + test:unit — nothing is finished until this is green |
bun run check | Types → lint → format:check → docs:check (scripts/check.ts) |
bun run format | Prettier write |
bun run cli … | Operational commands — see App CLI |
bun run cli doctor | Is 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).
bun run check --jsonThe 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.
| Script | What it does |
|---|---|
bun run test:unit | SKIP_MIGRATIONS=true bun test tests/unit — no Postgres |
bun run test:db | db:apply, then the full suite with SKIP_MIGRATIONS=true |
bun run test | bun test (everything under tests/) |
Migrations are applied only via db:apply, never on import — see
Database.
Database and Docker
Section titled “Database and Docker”| Script | What it does |
|---|---|
bun run db:apply | Apply migrations (src/db/migrate.ts) |
bun run db:generate | drizzle-kit generate from the schema |
bun run db:up / db:down | Docker Compose for local Postgres |
Stylesheet and generated docs
Section titled “Stylesheet and generated docs”| Script | What it does |
|---|---|
bun run css / css:watch | Tailwind → public/app.css |
bun run docs / docs:check | Regenerate or verify docs/reference.md |
See CSS and Generated reference.md.