Commands cheatsheet
Commands
CLI commands for day-to-day development, testing, and operations. For which script file each command runs, see Scripts & tooling.
30+
workflow commands
Unified
infra control
1-flag
composition
Monorepo root
Section titled “Monorepo root”Run from the repository root (boringstack/):
Regenerate all cross-app artifacts
bun run regen — ACL types, OpenAPI schema (needs api on :3000), lint-meta
RULES.md, docs JSON catalogs.
Drift checks before push
bun run check — same gates as CI for contracts across apps/docs.
Full validate
bun run check:full — check plus apps/api validate, apps/ui validate, and
apps/docs build:ci.
First-time local setup
./setup.sh or ./setup.sh --up — seed compose .env and optionally boot
the dev stack.
Paths in the sections below are relative to each app unless noted. Compose
commands run from infra/compose/compose; operational helper scripts live in
infra/compose/scripts.
Infra (docker-compose stack)
Section titled “Infra (docker-compose stack)”Start dev stack
./scripts/compose-up.sh. Data: n/a.
Stop, keep data
./scripts/compose-down.sh. Data preserved.
Stop and wipe data
./scripts/compose-down-clean.sh. Data not preserved (prompts; CONFIRM=yes to skip confirmation).
Start prod
STACK=prod ./scripts/compose-up.sh. Data: n/a.
With observability
WITH_OBSERVABILITY=1 ./scripts/compose-up.sh. Data: n/a.
With error tracking
WITH_GLITCHTIP=1 ./scripts/compose-up.sh. Data: n/a.
With queue dashboard
WITH_BULLMQ=1 ./scripts/compose-up.sh. Data: n/a.
With image-update bot
WITH_WUD=1 ./scripts/compose-up.sh. Data: n/a.
With local email catcher
WITH_MAILPIT=1 ./scripts/compose-up.sh (dev only). Data: n/a.
Service status
docker compose -f compose/docker-compose.yml -f compose/docker-compose.development-labels.yml --profile dev ps. Data: n/a.
Live logs
docker compose ... logs -f api-dev. Data: n/a.
Live resource use
docker stats. Data: n/a.
Backup db (offsite)
BACKUP_DRY_RUN=1 ./scripts/backup-wrapper.example.sh then drop the flag. Data preserved.
Flags compose: WITH_OBSERVABILITY=1 WITH_GLITCHTIP=1 ./scripts/compose-up.sh.
API app
Section titled “API app”Run in watch mode
bun run dev
Production bundle
bun run build
Run production bundle
bun run start
Typecheck + lint + knip
bun run check
Lint only
bun run lint
Auto-fix lint
bun run lint:fix
Dead-code detection
bun run knip
Unit + integration tests
bun run test
Full merge gate
bun run validate
Run the pre-push gate (same as `git push`)
bun run pre-push
Generate migration
bun run db:generate
Apply migrations
bun run db:migrate
Push schema (dev)
bun run db:push --force
Seed superuser (if SUPERUSER_EMAIL + _PASSWORD set)
bun run db:seed
Drizzle studio
bun run db:studio
Scaffold a new resource
bun run new:resource <name>
Build email templates
bun run build:templates
Watch email templates
bun run build:templates:watch
UI app
Section titled “UI app”Dev server (port 3001)
bun run dev
Production build
bun run build
Production preview
bun run preview
Typecheck
bun run typecheck
Lint + format + typecheck + knip
bun run check
Auto-fix lint
bun run lint:fix
Dead-code detection
bun run knip
Unit + component tests
bun run test
Coverage
bun run test:ci
e2e (Playwright)
bun run e2e
e2e visual baselines
bun run e2e:visual:update
Bundle size budget
bun run size:check
Bundle analyzer
bun run analyze
Lighthouse
bun run lighthouse
Full merge gate
bun run validate
Run the pre-push gate (same as `git push`)
bun run pre-push
Regenerate API schema
bun run generate:api
Scaffold a component
bun run new:component <Name>
Scaffold a feature
bun run new:feature <name>
Storybook
bun run storybook
Inside the dev containers (rare)
Section titled “Inside the dev containers (rare)”$ docker compose exec api-dev sh
$ docker compose logs -f --tail=100 api-dev
$ docker compose exec postgres psql -U app -d app
$ docker compose exec valkey valkey-cli
ok api-dev container shell spawned
# Streaming api-dev logs...
ok psql (17.x) connection established on database 'app'
ok valkey-cli connected to 127.0.0.1:6379Related
Section titled “Related”- Quickstart; the boot-from-clone path that produces this state.
- Environment variables; every knob you can flip alongside these commands.
- Profiles & overlays; what the
WITH_*=1flags actually toggle. - Glossary; the vocabulary (stack, overlay, profile, merge gate) the commands speak.
- Deployment; the production sequence that wraps these locally-run commands.