Thanks for your interest in contributing. This guide covers how to set up the development environment, run tests, and submit changes.
- Bun >= 1.1
- Node.js >= 22 (required by some web tooling)
- mpak CLI (required for smoke tests)
- Docker (optional, for container-based development)
git clone https://github.com/NimbleBrainInc/nimblebrain.git
cd nimblebrain
# Install API dependencies
bun install
# Install web client dependencies
cd web && bun install && cd ..
# Copy the environment template and fill in at least one LLM provider key
cp .env.example .env
# Edit .env — set ANTHROPIC_API_KEY (or OPENAI_API_KEY / GEMINI_API_KEY)bun run dev # API (:27247, auto-restart) + web client (:27246, HMR) — single terminal
bun run dev:api # API only
bun run dev:web # Web client only
bun run dev:tui # Interactive TUI (no web client)Output is prefixed [api] / [web]. Ctrl+C stops both.
Before submitting a PR, run the full verification suite:
bun run verify # lint → typecheck → unit tests → web tests → smoke testsIndividual steps:
bun run lint # Biome linter (src/ only)
bun run check # TypeScript type check
bun run test # Unit tests
bun run smoke # Integration/smoke tests (requires mpak + mcp-servers/echo)
bun run eval # LLM evals — requires ANTHROPIC_API_KEY (not in CI)Smoke tests require the mcp-servers/echo bundle to be available as a sibling directory. If you cloned from the monorepo, it's already there. If not, skip smoke tests with bun run lint && bun run check && bun run test.
LLM evals (test/eval/) send real messages to Claude and assert on agent behavior (e.g., correct tool discovery). They cost real money and are not part of verify. Run them manually when changing prompts, skills, or tool surfacing logic.
- Formatter and linter: Biome. Run
bun run formatto auto-fix. - TypeScript strict mode is enabled. No
anywithout justification. - No default exports in
src/— named exports only. - Tests live in
test/and mirror thesrc/directory structure.
- Fork the repo and create a branch from
main. - Make your changes in
src/orweb/src/. - Add or update tests in
test/for any logic changes. - Run
bun run verifyand ensure it passes cleanly. - Open a pull request against
main.
- Keep PRs focused — one logical change per PR.
- Describe why the change is needed, not just what it does.
- Reference any related issues.
Use GitHub Issues. Include:
- What you expected to happen
- What actually happened
- Steps to reproduce
- Bun version (
bun --version) and OS
By contributing, you agree that your contributions will be licensed under the Apache License, Version 2.0.