Scripts
Use the right script for the job: local development, quality gates, and CI.
Every template ships with the same quality scripts. Framework-specific extras are noted below. Prefer pnpm; npm, yarn, and bun work the same way.
Day to day
| Command | When to use it |
|---|---|
pnpm dev | Start the local dev server (Next.js uses Turbopack; TanStack Start uses Vite on port 3000). |
pnpm build | Production build. Run before deploy or when you want to verify the build locally. |
pnpm start | Serve the production build (Next.js) or preview the Vite build (TanStack Start). |
Quality
| Command | When to use it |
|---|---|
pnpm lint | Run ESLint with cache. Use while coding to catch issues early. |
pnpm lint:fix | Auto-fix ESLint issues, then run Prettier write. |
pnpm lint:ci | Strict lint for CI: zero warnings, plus Prettier check. Same gate as GitHub Actions. |
pnpm format | Format the whole repo with Prettier. |
pnpm format:check | Check formatting without writing files (CI-friendly). |
pnpm typecheck | TypeScript check with tsc --noEmit. Run before push if you changed types. |
pnpm knip | Find unused files, exports, and dependencies. Keep the scaffold lean. |
Husky runs lint-staged on commit and related checks on push. You rarely need to run the full suite by hand unless CI fails locally.
Framework-specific
These scripts exist only on the matching template:
| Command | Template | When to use it |
|---|---|---|
pnpm analyze | nextjs | Bundle analyzer build. Use when you care about client bundle size. |
pnpm generate-routes | tanstack | Regenerate the TanStack Router route tree after adding or renaming routes. |
pnpm preview | tanstack | Preview the production Vite build (same idea as pnpm start). |
pnpm clean | tanstack | Remove Vite / TanStack build caches (dist, .tanstack, .output). |
CI
GitHub Actions in the scaffold runs this sequence:
typecheck → lint:ci → knip → buildIf CI fails, reproduce the same order locally: pnpm typecheck && pnpm lint:ci && pnpm knip && pnpm build.
