Scripts
Every bun script, grouped by when you'd reach for it.
Every script lives in the root package.json; run any of them with bun run <name>. They're grouped below by when you actually reach for one.
Dev loop
bun run dev: start both apps through portless on named.localhostURLs (runbunx portless listto see them; branch-prefixed in a worktree).PORTLESS=0 bun run devuses fixed ports instead: web:3000, api:4000.bun run clean: remove build artifacts and caches (.next,.turbo,dist), everynode_modules, and generated typedefs.bun run devtools: open Turborepo DevTools.
bun run clean deletes every node_modules and the generated typedefs, so re-run bun install afterward.
Database
bun run auth:schema runs the Better Auth CLI; each db:* script builds @packages/env first, then runs Drizzle Kit against packages/db.
bun run auth:schema: regenerate the Better Auth tables inpackages/db/src/schema/auth.tsfrompackages/auth/src/schema.ts(--checkonly compares).bun run db:generate: generate a migration from schema changes.bun run db:migrate: apply pending migrations.bun run db:studio: open Drizzle Studio to browse and edit data.
Quality
bun run lint: Oxlint over the whole tree (also what CI runs).bun run format: Oxfmt, writing fixes.bun run format:check: Oxfmt, report only (also what CI runs).bun run check-types: type-check every workspace, then the repo scripts (check-types:scripts,tscover.github/scripts) and the test tree (check-types:tests, onetscrun pertests/**/tsconfig.json).bun run test: build the sharedpackages/*, regenerate the data-table font metrics, then run the whole suite from the repo-roottests/mirror. The build comes first because a test reaches a shared package the way the apps do, through its publishedexports, which point atdist; without it a fresh checkout fails to resolve the import rather than failing an assertion. Turbo caches the build, so a repeat run costs milliseconds. PR CI runs this andcheck-typestoo, so a failing test or type error blocks the merge.bun run test:e2e: the end-to-end suite, every*.e2e.test.tsundertests/, against a running local-stage stack (NODE_ENV=localwithAGENT_SIGNIN_ENABLED=true, so the agent can sign in).E2E_API_URLandE2E_WEB_URLdefault to the compose ports (localhost:4000,localhost:3000) and are refused unless local, since the suite writes through the API;E2E_POSTGRES_URLunlocks the flows that seed a second account. Golden: every contract response is snapshotted, andbun run test:e2e --update-snapshotsaccepts a deliberate change. Skipped when no stack is named, sobun run teststays green without one.
Release / production
bun run build: build every app with Turbo, then print each workspace's size. This is the same build the pre-commit hook runs.bun run release:version: print the version decision for the current release window as JSON (the last tag, the tree, what the window earned, and the larger of the two);--writemovespackage.jsonto it. The draft-PR workflow runs it on a push tocanarywhenever a release window is open, meaningmainexists andcanaryis ahead of it; running it by hand only previews, and it needs no network. It reads thev*tags, so fetch them first: with tags present but none reachable from HEAD it stops rather than computing from v0.0.0.bun run start: serve the production build.
The changelog, version bump, tag, and GitHub release are automated: you don't run them by hand. See Releases.
shadcn
bun run shadcn:update: update every shadcn/ui component, thenbun i.
bun run shadcn:update overwrites everything under web/next/src/components/ui/, so hand-edits to those files are lost. Put durable customizations in .github/scripts/shadcn-customize.ts, which re-applies them after each sync; the shadcn-sync skill covers the workflow.
Console
bun run console:roles <grant|revoke|list> [email] [role]: set a user's rung on the console role ladder.granttakesowner,adminormember, defaulting toadmin, or toownerwhile the install has none, which is how a fresh install gets its first way in.revokereturns them touser, andlistshows everyone with console access.grantandrevokeboth record a line in Activity attributed toconsole:roles, since nobody is signed in when it runs.
Runs automatically
prepareinstalls the Lefthook git hooks;postinstallnormalizes thecatalog:dependency entries. Both run for you afterbun install.
Next
- Code Quality: what
lint,format, andbuildenforce on every commit. - Architecture: the two apps and four packages these scripts drive.