Skip to content
BoringStack
GitHub

Scripts & tooling

1 min read

Template scripts

Prefer bun run commands over calling files directly. This page maps each wired command to the script under scripts/ and explains what that folder is for.

scripts/

grouped by purpose

auto-sync

from README + package.json

pre-push

local CI mirror

ui · scripts folders
Folder
Purpose
[`ci/`](ci/)
Pre-push gate, CI manifest
[`dev/`](dev/)
Local developer workflow guards
[`codegen/`](codegen/)
Scaffolding and OpenAPI contract generation
[`quality/`](quality/)
Test and bundle adjunct checks outside ESLint
[`lint-meta/`](lint-meta/)
Static meta-lint rules ([RULES.md](lint-meta/RULES.md))
ui · command map
Command
Script
Purpose
bun run dev
dev/preflight-host-dev.sh`
./scripts/dev/preflight-host-dev.sh && vite
bun run size:check:modulepreload
quality/check-modulepreload-size-coverage.ts
After `bun run build`, every `<link rel="modulepreload">` in dist/index.html
bun run lint:meta
lint-meta/cli.ts
Static checks for files ESLint can't parse as JavaScript:
bun run lint:meta:verify
lint-meta/cli.ts
Static checks for files ESLint can't parse as JavaScript:
bun run generate:lint-meta-docs
lint-meta/generate-rules-md.ts
tsx scripts/lint-meta/generate-rules-md.ts
bun run check:lint-meta-docs
lint-meta/generate-rules-md.ts
tsx scripts/lint-meta/generate-rules-md.ts --check
bun run check:scripts-docs
check-scripts-docs.ts
tsx scripts/check-scripts-docs.ts
bun run test:ci
quality/run-tests-clean.ts
Runs vitest and fails when the suite prints warning noise to stdout/stderr.
bun run new:component
codegen/new-component.ts
Scaffold a new component folder with the 8-file anatomy.
bun run new:feature
codegen/new-feature.ts
Scaffold a new feature folder.
bun run generate:api
codegen/generate-api.ts
Regenerate src/lib/api/schema.d.ts from the API app's OpenAPI document.
bun run generate:api:check
codegen/generate-api.ts
Regenerate src/lib/api/schema.d.ts from the API app's OpenAPI document.
bun run pre-push
ci/pre-push.sh
Local mirror of the UI app's CI gate. Runs everything CI runs so that a
ui · pre-push stages
  1. 1/${TOTAL} Fast checks (lint, lint:meta, format, typecheck, knip)
  2. 2/${TOTAL} Dependency vulnerability scan
  3. 3/${TOTAL} Tests
  4. 4/${TOTAL} Production build
  5. 5/${TOTAL} Bundle size budgets
  6. 6/${TOTAL} OpenAPI schema drift
api · scripts folders
Folder
Purpose
[`ci/`](ci/)
Pre-push gate, CI manifest
[`dev/`](dev/)
Local developer workflow guards
[`codegen/`](codegen/)
Scaffolding, ACL type sync, VAPID key generation
[`db/`](db/)
Database seed utilities
[`quality/`](quality/)
Test and coverage adjunct checks outside ESLint
[`lint-meta/`](lint-meta/)
Static meta-lint rules ([RULES.md](lint-meta/RULES.md))
api · command map
Command
Script
Purpose
bun run test
quality/run-tests-clean.ts
Runs bun test and fails when the suite prints warning noise to stdout/stderr.
bun run test:coverage
quality/check-coverage.ts
NODE_ENV=test bun run scripts/quality/check-coverage.ts
bun run dev
dev/preflight-host-dev.sh`
./scripts/dev/preflight-host-dev.sh && bun run --watch src/index.ts
bun run db:seed
db/seed-superuser.ts
Optional first-boot superuser bootstrap. Reads SUPERUSER_EMAIL and
bun run lint:meta
lint-meta/cli.ts
Static checks for files ESLint can't parse as JavaScript:
bun run lint:meta:verify
lint-meta/cli.ts
Static checks for files ESLint can't parse as JavaScript:
bun run generate:lint-meta-docs
lint-meta/generate-rules-md.ts
bun run scripts/lint-meta/generate-rules-md.ts
bun run check:lint-meta-docs
lint-meta/generate-rules-md.ts
bun run scripts/lint-meta/generate-rules-md.ts --check
bun run check:scripts-docs
check-scripts-docs.ts
bun run scripts/check-scripts-docs.ts
bun run new:resource
codegen/new-resource.ts
Scaffolds a new API resource:
bun run vapid:generate
codegen/vapid-generate.ts
Generate a fresh VAPID keypair for the Web Push notification channel.
bun run new:notification-event
codegen/new-notification-event.ts
Scaffolds a new notification event:
bun run new:action
codegen/new-action.ts
bun run scripts/codegen/new-action.ts
bun run new:role
codegen/new-role.ts
bun run scripts/codegen/new-role.ts
bun run new:subject
codegen/new-subject.ts
bun run scripts/codegen/new-subject.ts
bun run new:feature
codegen/new-feature.ts
bun run scripts/codegen/new-feature.ts
bun run generate:acl-types
codegen/generate-acl-types.ts
Copies the canonical ACL type spine from apps/api to
bun run generate:acl-types:check
codegen/generate-acl-types.ts
Copies the canonical ACL type spine from apps/api to
bun run pre-push
ci/pre-push.sh
Local mirror of apps/api CI gate. Runs everything CI runs so that a
api · pre-push stages
  1. 1/${TOTAL} Fast checks (typecheck, lint, lint:meta, knip)
  2. 2/${TOTAL} Dependency vulnerability scan
  3. 3/${TOTAL} Ensure Postgres + Valkey are running
  4. 4/${TOTAL} Test suite (integration)
  5. 5/${TOTAL} Test coverage
  6. 6/${TOTAL} Production build
  7. 7/${TOTAL} OpenAPI schema drift
  8. 8/${TOTAL} ACL types drift