Skip to Content
KTB Health Docs
Reference

Commands

npm scripts for the docs site and the product repo.

Docs site (this repo)

CommandDescription
bun run devVite dev server on :3000 (nitro vercel preset)
bun run buildProduction build with the vercel preset
bun run build:cfBuild with CLOUDFLARE_DEPLOY=1 → nitro cloudflare_module
bun run previewPreview the last build locally
bun run types:checktsc --noEmit
bun run deploybuild:cf + alchemy deploy
bun run deploy:wranglerbuild:cf + wrangler deploy against nitro's generated config

Environment variables:

  • CLOUDFLARE_DEPLOY=1 — select the cloudflare_module nitro preset.
  • NITRO_PRESET — explicit nitro preset override (wins over CLOUDFLARE_DEPLOY).

Product repo

Run from the product repo root unless noted.

CommandDescription
bun run devworkerd dev server on :3000 (production-runtime fidelity)
bun run dev:nodePlain Node dev (KTB_DEV_NODE=1, SQLite instead of D1)
bun run dev:secretsSync secrets from the cuora vault into .dev.vars
bun run checkfmt + lint + typecheck
bun run testvitest per package (scope runs per package)
bun run buildProduction build
bun run deployBuild + Alchemy deploy to Cloudflare prod
bun run db:generateGenerate Drizzle migrations
bun run db:migrateApply migrations to remote D1
bun run db:migrate:localApply migrations to local D1
bun run knipUnused exports/dependencies check
bun run check:archVerify arch-lint rules still fire
bun run gen:route-typesRegenerate plugin route types (generated, never hand-edit)

In apps/web: bun run test:e2e (Playwright — see Run e2e tests).

On this page