Skip to content
Reference

Commands And Scripts

pnpm and Turborepo tasks for the monorepo. Most run from the repo root; a few live only in the package that owns them.

Last updated on

5 min read

On This Page

Most-Used

These eight cover most daily work.

CommandDoes
pnpm devStart the product app on port 3000
pnpm docs:devStart the docs site on port 3001
pnpm test:runSingle-pass unit tests with coverage gates
pnpm test:integrationPostgres-backed integration tests
pnpm test:e2ePlaywright E2E suite (build + run)
pnpm db:migrate:devCreate or apply migrations in development
pnpm setup:doctorDiagnose missing or invalid env config
pnpm formatPrettier write across the workspace

Development

CommandDoesWhere
pnpm devNext.js product app on :3000 (turbo dev --filter=@syntaxkit/web)Root
pnpm docs:devFumadocs site on :3001Root
pnpm email:devReact Email preview (@syntaxkit/email preview)Root
pnpm --filter @syntaxkit/<package> devSame filter form; rarely neededRoot

dev depends on ^db:generate, so Turbo regenerates the Prisma client before the app starts.

Build

CommandDoes
pnpm buildturbo build across the workspace (web, docs, and packages)
pnpm --filter @syntaxkit/web buildBuild only the product app
pnpm --filter @syntaxkit/docs buildBuild only the docs site

build declares dependsOn: ["^build", "^db:generate"], so the Prisma client regenerates before packages that need it. You do not need pnpm db:generate by hand before a build.

Quality

CommandDoes
pnpm lintESLint across every package
pnpm check-typesTypeScript check across every package
pnpm formatPrettier write across the workspace
pnpm format:checkPrettier check (CI-friendly; non-zero exit on drift)
pnpm docs:lint-linksVerify internal links in the docs MDX
pnpm deploy:check-build-argsDrift-check NEXT_PUBLIC_* build args across deploy configs

lint and check-types are Turbo-cached. An unchanged graph is a no-op (FULL TURBO, usually milliseconds).

Tests

Four layers, each with its own command and file pattern. See Testing for the full story.

LayerCommandWhat runsFile pattern
Unit (watch)pnpm testVitest watch in every package*.test.ts(x) co-located
Unitpnpm test:runSingle Vitest run with coverage gates*.test.ts(x) co-located
Unit + coveragepnpm test:coverageSame as test:run plus per-package thresholdssame
Integrationpnpm test:integrationVitest with real Postgres (loads apps/web/.env.test)*.integration.test.ts
Live Stripepnpm test:stripeVitest against Stripe test mode; gated on RUN_STRIPE_LIVE=1*.live.test.ts
E2Epnpm test:e2eBuild the app, then Playwright + Chromiumapps/web/e2e/*.spec.ts
E2E (run only)pnpm test:e2e:runPlaywright only (skips the build step; used in CI)same
E2E (UI)pnpm test:e2e:uiPlaywright UI for time-travel debuggingsame

Root test scripts that need a database load apps/web/.env.test through dotenvx before Turbo starts.

test:integration, test:stripe (Turbo test:live), and test:e2e / test:e2e:run set cache: false. They hit live infra (Postgres, Stripe, Chromium), so every invocation actually runs.

Database

Every db:* task lives in packages/database and is proxied at the root, so pnpm db:<task> works from anywhere. See Database for the workflows.

CommandDoes
pnpm db:generateGenerate the typed Prisma client
pnpm db:migrate:devCreate and apply a migration in development
pnpm db:migrate:deployApply migrations non-interactively (production-safe)
pnpm db:migrate:statusCheck whether the DB matches prisma/migrations/
pnpm db:pushPush schema changes without a migration (prototype only)
pnpm db:test:pushdb:push against the test database (apps/web/.env.test)
pnpm db:studioOpen Prisma Studio
pnpm db:seedRun the seed dispatcher (defaults to bootstrap mode)
pnpm db:seed:bootstrapEmpty DB; first sign-up creates the personal org
pnpm db:seed:demoSample orgs and an admin (admin@demo.syntaxkit.com / password123)
pnpm db:seed:testTest fixtures (4 deterministic users for Playwright)
pnpm db:resetDrop, recreate, migrate, then bootstrap seed (empty database)
pnpm db:reset:demoDrop, recreate, migrate, then seed demo data
pnpm db:validateValidate the Prisma schema

db:reset and db:reset:demo run a destructive-guard script first, then the Prisma reset.

Setup, Tooling, And Deploy

CommandDoes
pnpm setup:doctorDiagnose env file, optional integrations, and DB reachability
pnpm auth:generateRegenerate auth.generated.prisma from Better Auth config
pnpm admin:bootstrap --email <email>Promote a user to platform admin (only when no admin exists)
pnpm billing:check-pricesCompare catalog prices to live Stripe Prices; skips when billing is unset
pnpm billing:reconcileRe-sync non-terminal subscriptions from Stripe (--dry-run to report only)
pnpm deploy:check-build-argsDrift-check NEXT_PUBLIC_* across Dockerfile, compose, fly.toml, render.yaml, and the GHA workflow
pnpm skills:syncMirror .agents/skills into .claude/skills (--check for CI)
pnpm cleanRemove node_modules, .next, .turbo, dist, coverage, and .source
pnpm --filter @syntaxkit/docs diagrams:buildRe-render Mermaid diagrams to SVG

Per-Package Tasks

Root scripts proxy into packages with pnpm --filter or Turbo. Inside a package you can run the same local names.

Most packages share this pattern:

Command (inside a package)Does
pnpm testVitest watch mode
pnpm test:runVitest single run
pnpm test:coverageVitest run with coverage gates
pnpm linteslint .
pnpm check-typestsc --noEmit (tsc -b for api, shared, analytics, and i18n)

Useful extras by package:

PackageExtra commands
apps/webdev, build, start, test:live, test:e2e, test:e2e:run, test:e2e:ui
apps/docsdev, build, start, lint:links, diagrams:build
packages/apitest:integration, test:live
packages/authtest:integration
packages/databaseevery db:* (canonical home; root proxies here)
packages/emailpreview (React Email; root exposes as email:dev)
packages/paymentstest:live

Packages with unit tests but no extras: analytics, core, shared, storage. Lint and types only: brand, i18n, ui. Config packages (eslint-config, typescript-config) define no scripts.

Turbo Caching

lint, check-types, build, test:run, and test:coverage are cached. The cache key includes the dependency graph plus each task's env allowlist, so a Stripe-key change busts only the live-test cache, not the build cache.

Tasks that hit live infra set cache: false and re-run every time: dev, test, every db:*, test:integration, test:live, test:e2e, and test:e2e:run. See Conventions for the full pipeline.

Where To Go Next

Also useful: Conventions, Setup, and Deployment.

Was this page helpful?

On this page