bc

module
v0.1.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2026 License: MIT

README

bc - AI Agent Orchestration for Software Development

Build Status Go Version License

Orchestration for AI agents. Coordinate teams of AI agents working together on your codebase.

bc is a CLI-first orchestration system for coordinating teams of AI agents to work on software development projects. It provides a structured, observable, and persistent environment for AI-driven engineering.

bc demo showing workspace initialization, agent creation, TUI dashboard, channel communication, and cost tracking

Multi-agent orchestration: initialize workspace, spawn engineers, coordinate via channels, track costs

Core Philosophy

  • CLI-First: Every feature is accessible and scriptable through the bc command line.
  • Agent Agnostic: Works with any AI agent that can run in a terminal (Claude Code, Cursor, Codex, Gemini).
  • Organic Growth: Start with a single root agent and grow your team conversationally.
  • Isolated Workspaces: Each agent operates in its own git worktree for conflict-free development.

Why bc?

Feature bc Single-Agent Tools
Multiple parallel agents
Role-based hierarchy
Inter-agent communication
Git worktree isolation
Cost tracking per agent Limited
TUI dashboard Varies

Supported AI Agents

bc works with any AI agent that runs in a terminal. Use --tool to specify:

bc agent create worker-01 --tool claude    # default
bc agent create worker-01 --tool gemini
bc agent create worker-01 --tool cursor
Agent Tool Flag Status Notes
Claude Code --tool claude ✅ Default Full support, tested extensively
Gemini --tool gemini ✅ Supported Google AI models
Cursor --tool cursor ✅ Supported Via terminal mode
Aider --tool aider ✅ Supported Any model backend
Codex CLI --tool codex ✅ Supported OpenAI models
OpenCode --tool opencode ✅ Supported Terminal agent
OpenClaw --tool openclaw ✅ Supported Autonomous agent
Custom agents Configure in settings.json ✅ Supported Any CLI tool

Installation

Quick Install (coming soon)
# Homebrew (macOS/Linux) - coming soon
brew install rpuneet/tap/bc

# Or build from source
git clone https://github.com/rpuneet/bc && cd bc && make install
Prerequisites
  • Go 1.25+
  • tmux
  • A configured AI agent tool (e.g., Claude Code, Cursor)
Build from Source
git clone https://github.com/rpuneet/bc
cd bc
make build
make install
Shell Completions

Enable tab completion for bc commands, agent names, and channel names:

# Bash
bc completion bash > /etc/bash_completion.d/bc
# or on macOS with Homebrew:
bc completion bash > $(brew --prefix)/etc/bash_completion.d/bc

# Zsh (add to fpath)
bc completion zsh > "${fpath[1]}/_bc"
# or for Oh My Zsh:
bc completion zsh > ~/.oh-my-zsh/completions/_bc

# Fish
bc completion fish > ~/.config/fish/completions/bc.fish

Quick Start

# 1. Run bc - prompts to initialize if no workspace exists
bc

# 2. Or explicitly initialize
bc init

# 3. Start the root agent
bc up

# 4. Open the TUI dashboard
bc home

# 5. Check status
bc status

# 6. Create an engineer agent
bc agent create --role engineer

# 7. Send work to the agent
bc agent send swift-falcon "Implement the login feature"

# 8. Stop all agents
bc down

Smart Default: Running bc with no arguments opens the TUI dashboard if a workspace exists, or prompts you to initialize one if not.

Commands

Workspace Lifecycle
Command Description
bc Open TUI dashboard (or prompt to init)
bc init Initialize a new workspace
bc up Start agents
bc down Stop all agents
bc home Open TUI dashboard
bc status Show agent status
bc workspace stats Show workspace statistics
Agent Management
Command Description
bc agent create Create a new agent
bc agent list List all agents
bc agent show <name> Show agent details
bc agent send <name> <msg> Send message to agent
bc agent broadcast <msg> Send message to all agents
bc agent send-to-role <role> <msg> Send to all agents of a role
bc agent send-pattern <pat> <msg> Send to agents matching pattern
bc agent attach <name> Attach to agent session
bc agent peek <name> Show recent output
bc agent health Show agent health status
bc agent stop <name> Stop an agent
bc agent delete <name> Delete an agent
bc agent rename <old> <new> Rename an agent
Agent Reporting
Command Description
bc agent report <state> [msg] Report agent state (idle, working, done, stuck, error)
Communication
Command Description
bc channel create <name> Create a channel
bc channel list List channels
bc channel show <name> Show channel details
bc channel send <ch> <msg> Send to channel
bc channel add <ch> <agent> Add member to channel
bc channel remove <ch> <agent> Remove member from channel
bc channel join <ch> Join channel (current agent)
bc channel leave <ch> Leave channel (current agent)
bc channel history <ch> Show channel message history
bc channel react <ch> <msg-id> React to a channel message
bc channel delete <name> Delete a channel
Teams
Command Description
bc team create <name> Create a team
bc team list List teams
bc team show <name> Show team details
bc team add <team> <agent> Add agent to team
bc team remove <team> <agent> Remove agent from team
bc team rename <old> <new> Rename a team
bc team delete <name> Delete a team
Roles
Command Description
bc role create --name <n> Create a role
bc role list List roles
bc role show <name> Show role details
bc role edit <name> Edit role in $EDITOR
bc role delete <name> Delete a role
bc role validate Validate all role files
Scheduled Tasks (Demons)
Command Description
bc demon create <name> Create scheduled task
bc demon list List demons
bc demon show <name> Show demon details
bc demon run <name> Manually trigger demon
bc demon edit <name> Edit demon config
bc demon enable <name> Enable a demon
bc demon disable <name> Disable a demon
bc demon logs <name> Show execution history
Background Processes
Command Description
bc process start <cmd> Start a process
bc process list List processes
bc process show <name> Show process details
bc process stop <name> Stop a process
bc process restart <name> Restart a process
bc process logs <name> Show process logs
bc process attach <name> Attach to process

| bc memory clear [agent] | Clear agent memory | | bc memory export [agent] | Export memory to JSON | | bc memory import <file> | Import memories from file |

Configuration
Command Description
bc config show Show configuration
bc config get <key> Get config value
bc config set <key> <val> Set config value
bc config list List all config keys
bc config edit Edit config in $EDITOR
bc config validate Validate config file
bc config reset Reset to defaults
Cost Tracking
Command Description
bc cost [agent] Show cost records (default)
bc cost show [agent] Show cost records
bc cost usage Claude Code token usage via ccusage
bc cost usage --monthly Monthly usage summary
bc cost budget show Show budget status
bc cost budget set <amount> Set a cost budget
bc cost budget delete Delete a budget
Worktrees
Command Description
bc worktree list List agent worktrees
bc worktree check Verify agent's worktree
bc worktree prune Remove orphaned worktrees
Event Log
Command Description
bc logs View event log
bc logs --agent <name> Filter by agent
bc logs --type <type> Filter by event type
bc logs --since <dur> Events since duration
Other
Command Description
bc version Show version
bc help Show help

Configuration

Configuration is stored in .bc/settings.json. Key settings:

{
  "user": {
    "name": "@yourname"
  },
  "server": {
    "host": "127.0.0.1",
    "port": 9374,
    "cors_origin": "*"
  },
  "providers": {
    "default": "claude",
    "providers": {
      "claude": {
        "command": "claude --dangerously-skip-permissions"
      },
      "gemini": {
        "command": "gemini --yolo"
      },
      "cursor": {
        "command": "cursor-agent --force --print"
      }
    }
  },
  "runtime": {
    "default": "docker",
    "docker": {
      "image": "bc-agent:latest",
      "cpus": 2,
      "memory_mb": 4096
    },
    "tmux": {
      "session_prefix": "bc",
      "history_limit": 10000,
      "default_shell": "/bin/bash"
    }
  },
  "storage": {
    "default": "sqlite",
    "sqlite": {
      "path": ".bc"
    }
  },
  "cron": {
    "poll_interval_seconds": 30,
    "job_timeout_seconds": 300
  }
}
User Nickname

Your nickname is displayed in channel messages when sending from the CLI:

# Set your nickname (must start with @, max 15 chars)
bc config set user.nickname @alice

# Messages now show your nickname
bc channel send eng "Hello team!"
# Output: [@alice] Hello team!

TUI Features

The bc home dashboard provides a full terminal UI with:

  • Responsive Layout: Works at minimum 80x24 terminal size
  • 14 Views: Dashboard, Agents, Channels, Costs, Commands, Roles, Logs, Worktrees, Workspaces, Demons, Processes, Memory, Routing, Help
  • Command Palette: Quick access to all actions via Ctrl+K
  • Keyboard Navigation: Number keys for views, Tab to cycle, j/k in drawer/lists
  • Channel Features:
    • @mention autocomplete with Tab completion
    • Role-based name colors and emoji prefixes
    • Arrow key scrolling in message history
  • Activity Timeline: Real-time agent activity on dashboard
Keyboard Shortcuts
Key Action
1-9, 0, - Jump to view (Dashboard=1, Agents=2, ..., Processes=-)
M Memory view
R Routing view
? Open Help view
Ctrl+K Open command palette
Tab / Shift+Tab Next/previous view
j/k or ↑/↓ Navigate drawer/lists
g / G Jump to first/last item in drawer
m Compose message (in Channels view)
i Toggle detail pane
@ Start mention autocomplete
Enter Send message / Select item
Esc Go back / Cancel
Ctrl+R Refresh all data
q Quit

Contributing

Contributions welcome! See CONTRIBUTING.md for details.

Directories

Path Synopsis
cmd
bc command
Package main is the entry point for the bc CLI.
Package main is the entry point for the bc CLI.
gendocs command
Package main generates CLI reference documentation from Cobra commands.
Package main generates CLI reference documentation from Cobra commands.
examples
demo-project command
internal
cmd
Package cmd implements the bc CLI commands.
Package cmd implements the bc CLI commands.
pkg
agent
Package agent provides agent lifecycle management for bc.
Package agent provides agent lifecycle management for bc.
attachment
Package attachment provides file storage for channel attachments.
Package attachment provides file storage for channel attachments.
client
Package client provides an HTTP client for the bcd daemon.
Package client provides an HTTP client for the bcd daemon.
container
Package container implements a Docker-based runtime backend for agent sessions.
Package container implements a Docker-based runtime backend for agent sessions.
cost
Package cost provides cost tracking and reporting for bc agents.
Package cost provides cost tracking and reporting for bc agents.
cron
Package cron provides SQLite-backed scheduled task management for bc.
Package cron provides SQLite-backed scheduled task management for bc.
db
Package db provides unified SQLite database management for bc CLI.
Package db provides unified SQLite database management for bc CLI.
doctor
Package doctor provides workspace health checks and diagnostics for bc.
Package doctor provides workspace health checks and diagnostics for bc.
events
Package events provides an append-only event log for bc.
Package events provides an append-only event log for bc.
gateway
Package gateway provides external messaging platform integrations.
Package gateway provides external messaging platform integrations.
gateway/discord
Package discord implements the gateway.Adapter for Discord.
Package discord implements the gateway.Adapter for Discord.
gateway/slack
Package slackgw implements the gateway.Adapter for Slack.
Package slackgw implements the gateway.Adapter for Slack.
gateway/telegram
Package telegram implements the gateway.Adapter for Telegram Bot API.
Package telegram implements the gateway.Adapter for Telegram Bot API.
log
Package log provides structured logging for bc using log/slog.
Package log provides structured logging for bc using log/slog.
mcp
Package mcp provides SQLite-backed storage for MCP server configurations.
Package mcp provides SQLite-backed storage for MCP server configurations.
names
Package names provides random name generation for agents.
Package names provides random name generation for agents.
notify
Package notify implements the notification gateway for delivering external platform events (Slack, Telegram, Discord, etc.) to subscribed bc agents via tmux send-keys.
Package notify implements the notification gateway for delivering external platform events (Slack, Telegram, Discord, etc.) to subscribed bc agents via tmux send-keys.
provider
Package provider — ConfigAdapter extends Provider with config file setup.
Package provider — ConfigAdapter extends Provider with config file setup.
runtime
Package runtime provides a backend-agnostic interface for agent session management.
Package runtime provides a backend-agnostic interface for agent session management.
secret
Package secret provides encrypted secrets management for bc workspaces.
Package secret provides encrypted secrets management for bc workspaces.
stats
Package stats provides workspace metrics and statistics tracking.
Package stats provides workspace metrics and statistics tracking.
tmux
Package tmux provides tmux session management for agent orchestration.
Package tmux provides tmux session management for agent orchestration.
token
Package token reads Claude Code session JSONL files from agent volume mounts and aggregates token usage per agent.
Package token reads Claude Code session JSONL files from agent volume mounts and aggregates token usage per agent.
tool
Package tool provides persistent storage and management for AI tool providers.
Package tool provides persistent storage and management for AI tool providers.
ui
Package ui provides consistent CLI output formatting utilities.
Package ui provides consistent CLI output formatting utilities.
workspace
Package workspace provides workspace/project management.
Package workspace provides workspace/project management.
worktree
Package worktree manages git worktree lifecycle for agent isolation.
Package worktree manages git worktree lifecycle for agent isolation.
Package server implements the bcd HTTP API server.
Package server implements the bcd HTTP API server.
handlers
Package handlers implements HTTP handlers for the bcd REST API.
Package handlers implements HTTP handlers for the bcd REST API.
mcp
Package mcp implements the Model Context Protocol server for bc workspaces.
Package mcp implements the Model Context Protocol server for bc workspaces.
ws
Package ws implements a Server-Sent Events (SSE) hub for real-time event broadcasting to connected web clients.
Package ws implements a Server-Sent Events (SSE) hub for real-time event broadcasting to connected web clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL