This document is the developer-facing map of the Burns repository: what is here, how to run it, and where to look first when you need to change something.
Use README for orientation and first-run setup, Getting Started for Smithers Developers for the newcomer tutorial path, and Contributing for the day-to-day contributor workflow. This guide stays focused on repo structure, commands, and runtime reference details.
Burns is a Bun monorepo with:
apps/web: React + Vite frontendapps/daemon: local Bun HTTP daemonapps/desktop: ElectroBun desktop shell packageapps/cli: CLI runtime and distribution pathpackages/shared: shared Zod schemas and domain typespackages/client: typed API client used by the frontendpackages/config: placeholder package for shared tooling config
Implemented today:
- Workspace registry with SQLite persistence
- First-run onboarding flow that captures Burns defaults before the first workspace is created
- Workspace onboarding flows for create, clone, and add-local-repo
- Workflow storage under
.smithers/workflows/<workflow-id> - Workflow list and detail views, including per-workflow file tree browsing and source preview
- AI-assisted workflow generation and prompt-driven editing via installed local agent CLIs
- Launch-field inference from workflow source for run forms
- Editable settings UI with reset-to-defaults, advanced Smithers auth/rootDir controls, and onboarding completion tracking
- Web UI for workspace overview, workflows, runs, approvals, inbox, and settings
- Smithers-backed run lifecycle APIs (
start,list,detail,resume,cancel) - Run event persistence in SQLite plus SSE proxy streaming with reconnect via
afterSeq - Approval decision APIs (
approve,deny) wired from UI - Managed per-workspace Smithers server lifecycle (startup, crash restart, graceful shutdown)
- Workspace server control APIs (
start,restart,stop,status) - Desktop shell that spawns a daemon in-process by default and blocks startup if another Burns daemon is already bound to the configured desktop URL
- CLI runtime that can start the daemon and serve built web assets
- Bun
1.2.19 - Git CLI
- Optional for AI workflow generation/editing: at least one supported agent CLI installed on
PATHclaudecodexgeminipi
Install dependencies from the repository root:
bun installStart the daemon:
bun run dev:daemonStart the web app in a second terminal:
bun run dev:webOpen http://localhost:5173.
The web app defaults to http://localhost:7332 for API calls. Override with:
VITE_BURNS_API_URL=http://localhost:7332 bun run dev:webDesktop and CLI runtimes can also inject:
window.__BURNS_RUNTIME_CONFIG__ = {
burnsApiUrl: "http://localhost:7332",
runtimeMode: "desktop", // or "cli"
}Other entry points:
bun run desktop:dev
bun run cli:startFor contributor-oriented guidance on when to use the desktop loop versus the standard daemon + web loop, see Contributing. For desktop-specific runtime details, see apps/desktop/README.md.
bun run dev:web: run Vite dev serverbun run dev:daemon: run daemon with watch modebun run build:web: build frontendbun run desktop:dev: run ElectroBun desktop appbun run desktop:build:canary: build desktop canary artifactsbun run desktop:build:stable: build desktop stable artifactsbun run desktop:build:artifact: build desktop archive intodist/desktop(channel/version via env)bun run cli:build:artifact: build CLI archive intodist/cli(channel/version via env)bun run smoke:desktop-runtime: desktop runtime smoke checkbun run smoke:cli-runtime: CLI runtime smoke checkbun run smoke:release: run both smoke checksbun run cli:start: run CLI daemon + web startup flowbun run cli:daemon: run CLI daemon-only flowbun run cli:web: serve built web assets from CLIbun run typecheck: typecheck shared, client, web, daemon, cli, and desktop packages
Desktop dev mode env options:
BURNS_DESKTOP_DEV_SOURCE=views|vite(viewsdefault)BURNS_DESKTOP_DEV_VITE_URL=http://localhost:5173BURNS_DESKTOP_FORCE_API_URL=http://localhost:7332
Additional app-level scripts:
apps/web:bun run typecheck,bun run lint,bun run previewapps/daemon:bun run start,bun run typecheck,bun run test,bun run test:rawapps/cli:bun run start,bun run build:artifact,bun run typecheck,bun run testapps/desktop:bun run build,bun run build:canary,bun run typecheck,bun run test
bun run typecheck: monorepo typecheckcd apps/web && bun run lint: web linting and React Compiler rulescd apps/daemon && bun run test: daemon route, service, and integration tests in isolated workspacescd apps/cli && bun run test: CLI argument and path resolution testscd apps/desktop && bun run test: desktop runtime and config contract testsbun run smoke:release: desktop + CLI runtime smoke coverage
Desktop and CLI artifact assembly is script-driven through scripts/release.
bash scripts/release/run-build-step.sh --label "desktop build" --command "<desktop-build-command>"bash scripts/release/run-build-step.sh --label "cli build" --command "<cli-build-command>"bash scripts/release/artifact-name.sh --channel canary --component desktop --version 0.0.0-canary.1+abc12345 --target-os darwin --target-arch arm64 --extension zipbash scripts/release/collect-artifacts.sh --channel canary --version 0.0.0-canary.1+abc12345 --target-os darwin --target-arch arm64 --desktop-pattern "dist/desktop/*" --cli-pattern "dist/cli/*" --output-dir release-artifactsbash scripts/release/create-release-notes.sh --channel canary --version 0.0.0-canary.1+abc12345 --commit <sha>
The daemon stores local state under BURNS_DATA_ROOT when that env var is set. Otherwise the default data root is ~/.burns.
- SQLite DB:
<data-root>/burns.sqlite - Managed workspace root:
<data-root>/workspaces
Each managed workspace stores workflows at:
<workspace-path>/.smithers/workflows/<workflow-id>/Primary workflow entrypoints are resolved from:
<workspace-path>/.smithers/workflows/<workflow-id>/workflow.tsx
<workspace-path>/.smithers/workflows/<workflow-id>/workflow.tsEach managed workspace also stores Smithers runtime state at:
<workspace-path>/.smithers/state/smithers.dbOptional Smithers lifecycle env vars:
BURNS_SMITHERS_MANAGED_MODE=0to disable daemon-managed per-workspace Smithers processesBURNS_SMITHERS_PORT_BASE=7440to change the first managed Smithers portBURNS_SMITHERS_MAX_WORKSPACE_INSTANCES=1000to change the managed port scan rangeBURNS_SMITHERS_ALLOW_NETWORK=1to run managed Smithers servers with network access enabled
- Documentation Index
- Codebase Layout
- Daemon API Reference
- ElectroBun Release Plan
- Release Automation Reference
- Release Runbook (Canary + Stable)
- Release Checklist
- Workspace + Runtime Handoff (Next Agent)
- Product Spec (target state)
- The app-level READMEs under
apps/cliandapps/desktopcover package-specific runtime behavior. - The product spec describes target behavior; implementation-accurate details live in the docs linked above.