Build and test workflow
WorktreeOS uses Bun for everything — install, scripts, bundling, and tests.
Install
Section titled “Install”bun installinstalls workspace dependencies from the repository root.
Run the CLI
Section titled “Run the CLI”bun run wos <command>is equivalent to running apps/cli/index.ts.
Build commands
Section titled “Build commands”bun run build:web— buildapps/web→apps/web/dist. The daemon serves static assets from there over loopback.bun run build:binary— build a single standalone executabledist/wosviabun --compile. It embeds the CLI, the daemon, the workspace packages, and the web UI; running it needs neither Bun, norapps/web/dist, nor the source checkout. See Release binary.bun run dist— build the web UI and restart the daemon.
Docs site
Section titled “Docs site”The documentation site lives in apps/docs and uses Astro Starlight:
bun run --filter @worktreeos/docs dev # local dev serverbun run --filter @worktreeos/docs build # static buildbun run --filter @worktreeos/docs preview # preview the buildRun the full suite from the repository root:
bun testThe 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.