Ir al contenido

Development

Esta página aún no está disponible en tu idioma.

Tooling Requirements

See Getting Started for the required versions. Use these versions:

  • Bun 1.4.x
  • Node.js >=24

Commands

These commands match the scripts in the root package.json.

CommandDescription
bun run devStart all workspaces on their fixed local ports.
bun run dev:appsStart application workspaces.
bun run dev:packagesStart package workspaces.
bun run buildBuild all workspaces.
bun run startRun the start task of each workspace.
bun run cleanRemove build artifacts.
bun run checkRun Adamantite lint, format, and type checks.
bun run fixApply safe lint fixes and format code.
bun run analyzeDetect unused dependencies, files, and exports.
bun run codegenGenerate workspace source and environment types.
bun run env:checkValidate Varlock workspaces in parallel.
bun run env:scanBuild client artifacts and scan for sensitive values.
bun run testRun the test suite.
bun run test:watchRun the test suite in watch mode.
bun run db:pushPush the Drizzle schema to the database.
bun run db:migrateRun the Drizzle migrations.
bun run docker:upStart the local services.
bun run docker:downStop the local services.
bun run boundariesCheck Turborepo package boundaries.
bun run generateRun a template recipe with Turbo generators.
bun templateRun a template command (setup, rename, add).
bun run scriptsRun the project script entry point.

To run a command for one workspace, use this syntax:

Terminal window
bun run <command> --filter <workspace>

Application workspaces separate generation into codegen:* scripts. codegen:env generates environment types and codegen:i18n compiles the Paraglide messages. Mobile compiles the messages with scripts/codegen.ts so Metro receives the strategy it needs. The Extension also has codegen:types, which runs wxt prepare. Docs and Web also have codegen:types, which runs astro sync. astro sync compiles the Paraglide messages again through the Vite plugin in astro.config.ts, so these workspaces use codegen:astro to run codegen:i18n and then codegen:types in sequence. Only one process writes the message output at a time, and the output of the Vite plugin is the final result. Keep the --strategy value of codegen:i18n the same as the strategy in astro.config.ts. The codegen script of a workspace runs its codegen:* scripts at the same time with Bun’s parallel script runner. Turbo keeps one dependency boundary. You can run a codegen:* script on its own during development. Run bun run codegen after you clone the repository, create a worktree, or install dependencies.

Development Servers

Each HTTP-serving workspace runs its framework command directly as its dev script on a fixed local port. Application workspaces declare the port as the PORT default in their .env.schema, and their framework configuration reads ENV.PORT. The Mobile server and the package development servers set theirs with a ${PORT:-<port>} fallback in the dev script:

WorkspaceURL
APIhttp://localhost:3000
Apphttp://localhost:3001
Mobile serverhttp://localhost:3002
Desktop frontendhttp://localhost:3003
Docshttp://localhost:3004
Extension serverhttp://localhost:3005
Webhttp://localhost:3006
Drizzle Studiohttps://local.drizzle.studio?port=4000
Email previewhttp://localhost:4001
Inngesthttp://localhost:4002

Package development servers use the 4000 block in alphabetical order: db on 4000, email on 4001, and workflows on 4002. The Inngest development server polls the API workflows endpoint at http://localhost:3000/workflows. Drizzle Studio’s local server listens on http://localhost:4000; open the interface at https://local.drizzle.studio?port=4000, since the bare hosted URL connects to Drizzle’s default port instead.

Managing Dependencies

  • bun run bump:deps - Update dependencies interactively across workspaces.
  • bun run analyze - Detect unused dependencies, files, and exports.

Template Management

  • bun template setup - Configure the project and record its template version.
  • bun template rename - Rename the project and update package scope references.
  • bun template add app <name> - Add an application workspace from the template.
  • bun template add package <name> - Add a package workspace from the template.
  • bun run scripts - Run the extensible entry point for scripts that the project owns.

An agent applies template updates. See Updating your project.