Package scripts
dbx writes files, not your package.json — but a few scripts are worth standardizing, because the toolchain's formatting/linting and task running both go through Vite+. Any bare dbx <command> that matches a Vite+ command is forwarded straight to it (dbx fmt, dbx run -r build, dbx dev), so a project only needs the one dbx command. This page shows the recommended root scripts and how to move an existing Biome + Turbo project onto them.
Recommended scripts
The repo root package.json:
{
"scripts": {
"format": "dbx fmt",
"lint": "dbx lint --fix",
"check": "dbx check",
"build": "dbx run -r build",
"typecheck": "dbx run -r typecheck",
"test": "dbx run -r test",
"dbx:sync": "dbx sync",
"dbx:watch": "dbx watch",
"commitlint": "commitlint",
"postinstall": "husky"
}
}| Script | What it does |
|---|---|
format / lint / check | Oxfmt / Oxlint across the repo (check = format check + lint). |
build / typecheck / test | Runs the task in every workspace, in dependency order. |
dbx:sync / dbx:watch | Regenerate the managed files / re-sync on change. |
commitlint / postinstall | Conventional Commits via commitlint + husky. |
Notes:
- A bare command that names a Vite+ command is forwarded to Vite+ (
vp) — eg.dbx fmt,dbx dev,dbx run -r build,dbx add zod(Vite+ aliases too). Built-in commands win, sodbx migrateis the toolchain's migration — usedbx vite migratefor Vite+'s. The explicitdbx vite <command>passthrough always works. - Vite+ resolves from the repo root, so
format/lintlive there — keep them out of the individual workspaces. dbx run -r <task>runs a task in every workspace package in dependency order. A task is either apackage.jsonscript or avite.config.tsrun.tasksentry. For long-running processes usedbx run -r --parallel dev.dbxis the toolchain binary, soyarn dbx <cmd>(eg.yarn dbx sync) works even without a script; thedbx:*aliases are just for discoverability.
When ci.changelog is enabled, dbx sync also writes a husky commit-msg hook (.husky/commit-msg) that runs commitlint, so commits are linted locally as well as in CI. Use postinstall (not prepare) to activate husky: Yarn Berry never runs prepare on install. Husky hooks have no file extension, so on Windows add .husky/* text eol=lf to .gitattributes — a trailing CR silently breaks the hook.
Migrate an existing project
Add the toolchain + Vite+, and drop what they replace:
diff- "@biomejs/biome": "catalog:", - "turbo": "^2.11.2", + "@deltabox/toolchain": "^1.2.3", + "vite-plus": "^1.2.0",Fold the Biome config into a root
vite.config.ts:shdbx migrate --from biome --target vite --writeOr, if the project uses
dbx.config.ts, author the Vite+ config there undertoolchain.vite.dbx syncthen writes the rootvite.config.tsshim (see Vite+).dbx migrate --from vite --writefolds an existing hand-writtenvite.config.tsin.Replace the scripts (see the tables below), then delete
biome.jsonandturbo.json.Add a
dbx.config.tsand sync the managed files:shdbx syncVerify — this is what CI runs:
shdbx sync --check yarn build
Biome → Oxc
| Before | After |
|---|---|
biome format --write . | dbx fmt |
biome check --fix . | dbx lint --fix |
biome.json | vite.config.ts |
Remove @biomejs/biome, delete biome.json, and drop any per-workspace format/lint scripts.
Turbo → Vite Task
| Before | After |
|---|---|
turbo build | dbx run -r build |
turbo typecheck | dbx run -r typecheck |
turbo test | dbx run -r test |
turbo dev | dbx run -r --parallel dev |
turbo.json | (optional) run.tasks in vite.config.ts |
Remove turbo and turbo.json. Ordering comes from each package's package.json dependencies, so no turbo.json graph is needed.
Per-workspace tasks
For cached, dependency-aware tasks, define them in each package's dbx.config.* rather than package.json — a task and a script cannot share a name:
import { defineConfig } from '@deltabox/toolchain';
export default defineConfig({
toolchain: {
vite: {
run: {
tasks: {
build: {
command: 'tsdown --config-loader unrun',
cache: { input: [{ auto: true }, '!dist/**'], output: ['dist/**'] },
},
test: {
command: 'vitest run',
cache: { input: [{ auto: true }], output: [] },
},
},
},
},
},
});See the Monorepo guide for the full task setup, Migrations for the dbx migrate reference, and Providers (Vite+) for the dbx vite passthrough.