Welcome to Nebutra Sailor Docs 🎉
ChangelogIntroductionLicensing
Help Center (External) ↗

pnpm Scripts Reference

Complete reference for all Turborepo-orchestrated pnpm scripts in Nebutra-Sailor.

All scripts are orchestrated by Turborepo and run from the monorepo root unless otherwise noted.

# Run any script from the monorepo root
pnpm <script>

# Run a script for a specific package
pnpm --filter @nebutra/ui typecheck
pnpm --filter apps/web dev

Development

ScriptDescription
pnpm devZero-key preview (scripts/dev/preview.ts): local PGlite database, demo sign-in admin@example.com / preview-demo, site on :3000, product app on :3001 (falls back a thousand ports on conflict)
pnpm dev:allturbo run dev across every app — the "start everything" version
pnpm dev:webJust the product app (@nebutra/web)
pnpm dev:landingJust the marketing site
pnpm dev:apiJust the gateway, standalone
pnpm dev:authJust the Better Auth login center
pnpm dev:storybook / pnpm dev:docsComponent playground / this docs site

dev:dashboard, dev:ai-saas, dev:marketing, and similar preset filters exist in this monorepo's own package.json (they target apps like @nebutra/admin and @nebutra/blog), but those apps are Nebutra's own product and aren't part of the default create-sailor scaffold — don't expect them in a fresh project.

Build

ScriptDescription
pnpm buildProduction build for all apps (turbo run build, after syncing brand tokens)
pnpm build:strictBuild with full UI governance + brand-token verification

Code quality

ScriptDescription
pnpm typecheckTypeScript type checking (turbo, all packages)
pnpm lintBiome lint (all packages)
pnpm lint:fixAuto-fix lint issues
pnpm formatBiome format (all packages)

Testing

ScriptDescription
pnpm testRun all Vitest unit tests
pnpm test:watchWatch mode
pnpm test:coverageWith coverage report (80% threshold)
pnpm test:archArchitecture conformance tests
pnpm e2ePlaywright E2E tests

Database

ScriptDescription
pnpm db:deployThe deploy command. Migrations, then platform.sql + generated RLS, then verifies.
pnpm db:checkRead-only drift check — the other half of db:deploy
pnpm db:generateRegenerate Prisma client (and generated/rls.sql)
pnpm db:migrateCreate and apply a migration (local development)
pnpm db:pushPush schema without a migration file (local prototyping only)
pnpm db:studioLaunch Prisma Studio GUI

Infrastructure

ScriptDescription
pnpm infra:upStart the Docker stack (Postgres + Redis)
pnpm infra:liteStart lite stack (PostgreSQL only — fastest)
pnpm infra:downStop all services
pnpm check-envValidate environment variables

Brand & Design

ScriptDescription
pnpm brand:syncSync brand assets across packages
pnpm brand:initInitialize brand configuration
pnpm brand:applyApply brand changes to all packages
pnpm brand:paletteInteractive palette generator
# Generate a custom color palette
node scripts/generate-palette.mjs --primary=#7C3AED --secondary=#F59E0B

API & Types

ScriptDescription
pnpm generate:api-typesRegenerate TypeScript types from OpenAPI spec
pnpm docs:cliAuto-generate CLI reference documentation

Preset & Configuration

ScriptDescription
pnpm preset:envConfigure active preset via interactive CLI

Release & Versioning

ScriptDescription
pnpm version:packagesBump package versions (changesets)
pnpm releasePublish packages to npm registry
# Standard release workflow
pnpm version:packages   # Bump versions based on changesets
git push --follow-tags
pnpm release            # Publish to npm

Bundle analysis

ScriptDescription
pnpm sizeCheck bundle size against budget
pnpm size:whyDetailed bundle composition analysis

Governance & compliance

ScriptDescription
pnpm license:checkAudit production dependency licenses
pnpm ui:validate-policyValidate UI token governance policy
pnpm ui:verify-governanceStrict governance verification

Useful combos

# Fresh start (full reset)
pnpm infra:down
pnpm infra:up
pnpm db:migrate

# Before a commit
pnpm typecheck && pnpm lint && pnpm test

# After pulling changes
pnpm install
pnpm db:generate
pnpm db:migrate

# Storybook development
pnpm --filter @nebutra/storybook dev

# Production readiness check
pnpm build && pnpm test && pnpm e2e

Filter syntax

Use --filter to target specific apps or packages:

# By package name
pnpm --filter @nebutra/ui typecheck
pnpm --filter @nebutra/billing test

# By app name (without @)
pnpm --filter landing dev
pnpm --filter web build

# Multiple filters
pnpm --filter @nebutra/ui --filter @nebutra/tokens build

# Run script in all packages
pnpm -r typecheck

Turborepo caching

Turborepo caches task outputs locally and (optionally) remotely. Cache hits are shown with cache hit, replaying output.

# Force re-run, bypass cache
pnpm build --force

# Remote caching (requires Vercel account)
pnpm dlx turbo login
pnpm dlx turbo link

How is this guide?

Edit on GitHub

Last updated on

On this page

Development
Build
Code quality
Testing
Database
Infrastructure
Brand & Design
API & Types
Preset & Configuration
Release & Versioning
Bundle analysis
Governance & compliance
Useful combos
Filter syntax
Turborepo caching