As a Bring Your Own Key (BYOK), local-first fork, developing Openbuff is highly streamlined. Since there is no required hosted backend or remote credit system, most development tasks center around the CLI and SDK running locally on your machine with your own configured LLM keys.
To develop the CLI locally, you do not need to run a web server or database. Simply configure your local providers and run the CLI developer task directly:
-
Install Dependencies:
bun install
-
Configure Your API Keys: Set up your preferred OpenAI-compatible or Anthropic-compatible provider keys in your shell:
export OPENAI_API_KEY="your-api-key" # Or for Anthropic/Claude and other providers: # export ANTHROPIC_API_KEY="your-key" # export OPENROUTER_API_KEY="your-key"
-
Start the CLI in Development Mode:
bun start-cli
This will boot the terminal UI (TUI) client in your current terminal session, pointing to the local monorepo source.
Openbuff no longer requires a hosted web app, billing system, or BigQuery pipeline for CLI/SDK development. The remaining service helpers are only for local integration dependencies that retained packages may need during development.
-
Start Services:
bun up
-
Check Status / Stop Services:
bun ps # Check running services bun down # Stop local services
-
Logs: Log outputs are written to
debug/console/.
- Always use
bunfor package management:bun install,bun add <pkg>,bun run ...(avoidnpmoryarninside the workspace to keep lockfiles consistent).
To run the local test suite:
cd cli
bun testFor comprehensive E2E terminal testing (which requires tmux):
- See cli/src/tests/README.md for detailed instructions on E2E test runs.
Before opening a PR or pushing, run the early GitHub CI gates locally:
bun run check:ci-localThis regenerates tool definitions (and fails if the tracked generated files drift from git HEAD — staged changes included), then runs guard:memory-drift and guard:sync-agent-config. Regenerating may mutate the working tree when schemas drift — review and commit those files if needed. It also runs the full agents and common test suites, so runtime-only regressions (such as TDZ errors that typecheck misses) are caught before you push.
Each step can be capped with OPENBUFF_CI_LOCAL_STEP_TIMEOUT_MS (milliseconds; unset or 0 disables the timeout) so a hung suite cannot block a pre-push hook forever. A clean Ctrl-C releases the lock automatically. After a crash, the stale .openbuff/ci-local.lock records the holder PID — verify with ps -p <pid> that nothing is still running, then delete the file. .openbuff/ carries its own .gitignore, so lock files never show up in git status.
Optionally install a local pre-push hook (not committed; lives under .git/hooks/):
bun run install:pre-push
# overwrite a non-managed existing hook:
bun run install:pre-push -- --forceThe compiled CLI and published SDK ship tree-sitter.wasm, every language
grammar declared by packages/code-map/src/wasm-files.ts, and a
tree-sitter-manifest.json containing SHA-256 hashes. Release wrappers verify
that manifest on startup and redownload the current release if an installed
asset is missing or corrupted. Compiled binaries also have a checksum-pinned
legacy-wrapper repair path for installations whose older npm wrapper preserved
the parser runtime but discarded language grammars.
When adding a language, update the canonical WASM manifest, provide a compatible
tag query, add a checksum-pinned repair source when neither dependency publishes
the grammar, and keep all-language-wasm.test.ts plus
grammar-wasm-repair.test.ts green. Builds fail when an advertised grammar
cannot be packaged or checksum-verified; missing grammars must not be treated as
optional.
Use the openbuff namespace for new commands and help text. Do not reintroduce codebuff command parsers.