ZeroStarter

Scripts

Available scripts for development, maintenance, and production.

Overview

ZeroStarter provides a comprehensive set of scripts for development, maintenance, and production workflows. These scripts are defined in the root package.json and can be run using bun run <script-name>.

Scripts

Development

  • bun run dev: Start the development servers.

Maintenance

  • bun run clean: Remove build artifacts and caches (.next, .turbo, dist, etc.) plus all node_modules and generated typedefs.

bun run clean deletes node_modules and the generated typedefs, so you must re-run bun install afterward.

  • bun run lint: Lint the entire monorepo with Oxlint in a single pass. Oxlint is also run on staged files at commit time via lint-staged.
  • bun run format: Format the codebase using Oxfmt.
  • bun run format:check: Check formatting without making changes.
  • bun run check-types: Check the types of the codebase (runs the Turbo check-types pipeline, then check-types:scripts).
  • bun run check-types:scripts: Type-check the repo scripts with tsgo -p .github/scripts/tsconfig.json.

Production

  • bun run build: Build the applications. Runs turbo run build --summarize and then bun .github/scripts/build-sizes.ts, which reports each workspace's build size after every build. The web/next build itself runs compress-images.ts first (Sharp and SVGO optimization of web/next/public), then the docs generator (--strict), then fumadocs-mdx, then next build.
  • build:vercel: There is no root bun run build:vercel script; it is a Turbo task run via turbo run build:vercel during Vercel deployments. In the api/hono workspace this first runs tsdown (producing dist/), then bun build dist/index.mjs --outfile vercel-bundle/index.mjs --target bun --minify --external hono to produce the deployed vercel-bundle/.
  • bun run start: Start the production servers.

Database

  • bun run db:generate: Generate Drizzle migrations.
  • bun run db:migrate: Run Drizzle migrations.
  • bun run db:studio: Open Drizzle Studio to view/edit data.

Console

  • bun run console:roles: Manage admin console access by setting a user's role (Better Auth admin plugin). Runs bun .github/scripts/console-roles.ts <grant|revoke|list> [email]: grant <email> sets role = admin (console access), revoke <email> sets role = user, and list shows the current console admins.

Utilities

  • bun run shadcn:update: Update all shadcn/ui components (runs the update script, then bun i).
  • bun run devtools: Open Turborepo DevTools.
  • bun run prepare: Install git hooks via Lefthook.
  • bun run postinstall: Normalize and sort the catalog: dependency entries via bun .github/scripts/deps-manager.ts (runs automatically after bun install).