Skip to content

Build and test workflow

WorktreeOS uses Bun for everything — install, scripts, bundling, and tests.

Terminal window
bun install

installs workspace dependencies from the repository root.

Terminal window
bun run wos <command>

is equivalent to running apps/cli/index.ts.

  • bun run build:web — build apps/webapps/web/dist. The daemon serves static assets from there over loopback.
  • bun run build:binary — build a single standalone executable dist/wos via bun --compile. It embeds the CLI, the daemon, the workspace packages, and the web UI; running it needs neither Bun, nor apps/web/dist, nor the source checkout. See Release binary.
  • bun run dist — build the web UI and restart the daemon.

The documentation site lives in apps/docs and uses Astro Starlight:

Terminal window
bun run --filter @worktreeos/docs dev # local dev server
bun run --filter @worktreeos/docs build # static build
bun run --filter @worktreeos/docs preview # preview the build

Run the full suite from the repository root:

Terminal window
bun test

The repository also exposes bun run test, which wraps bun test in scripts/run-tests.ts. That wrapper provisions an isolated WOS_HOME temporary directory for the run and cleans up test-owned Docker Compose processes afterward, so tests don’t touch your real ~/.wos.