CLI CODING AGENT

Autonomous AI Coding Agent

A focused developer assistant designed for surgical code edits, git-safe rollbacks, and self-improving project memory.

brocode -v
┌┐ ┬─┐┌─┐╔═╗┌─┐┌┬┐┌─┐
├┴┐├┬┘│ │║  │ │ ││├┤
└─┘┴└─└─┘╚═╝└─┘─┴┘└─┘
ship less, ship right
BroCode v0.1.59
$curl -fsSL https://raw.githubusercontent.com/plumpslabs/bro-code/main/scripts/install.sh | bash
brocode — ~/src/payments (branch: main)
TUI Session
ship less, ship right
BroCode v0.1.59
⚡ Type a prompt or /help for commands.
YOU
Refactor HTTP client with exponential retry on 429 & 503 status codes
BROCODE BUILDER anthropic/claude-3-7-sonnet
I surveyed the codebase using BM25 and identified internal/client/http.go. Applying a surgical 5-tier resilient edit to inject exponential backoff with jitter on transient status codes.
DIFF internal/client/http.go (+32 −8) · ctrl+f
Type a prompt or command (/help, /sessions, /new)...

Key Features

Pragmatic developer tools built for productive coding sessions.

Continuous Project Memory

Automatically extracts conventions, architecture decisions, and codebase gotchas into .brocode/memory.md so new sessions always start warm.

Self-Tuning Efficiency

Observes real context utilization across turns and dynamically calibrates context compaction budgets so the agent gets faster and more cost-efficient over time.

Resilient Code Editor

Applies localized search-and-replace edits that gracefully tolerate line ending, trimming, and indentation differences without failing.

Instant Rollbacks (/undo)

Automatically captures git shadow snapshots before writing file edits, enabling instant, zero-loss rollback with a single /undo command.

Multi-Mode Workflows

Toggle between Builder (coding & test execution), Planner (safe architectural analysis), and Miner (knowledge exploration).

LSP & MCP Integration

Connects to Language Server Protocol for live diagnostic checks, plus extensible Model Context Protocol (MCP) server integration.

Why BroCode

A straightforward comparison with typical coding tools.

Capability BroCode Standard Tools
Codebase Memory Continuous learning (memory.md) Lost after session ends
Context Self-Tuning Adaptive self-tuning efficiency Hardcoded static limits
Code Modification Resilient fuzzy matching Strict exact string match
Rollback Safety Instant /undo snapshot Direct disk overwrite
Autocompletion Live / commands & @ files Plain text prompt only
Installation Single standalone binary Heavy runtime dependencies

Operating Modes

Toggle modes during interactive sessions using Shift + Tab.

BUILDER

Implementation Mode

Default execution mode. Inspects source files, performs surgical code edits, runs shell commands, and verifies test suites.

PLANNER

Architecture Analysis

Read-only mode. Explores call graphs and drafts implementation roadmaps without modifying files on disk.

MINER

Knowledge Extraction

Learns repository structure and captures durable architecture conventions into .brocode/memory.md.

Built-in Slash Commands

Type / in the prompt to open the autocomplete menu.

Command Description
/undo Roll back current turn changes instantly via git snapshots
/memory View learned project knowledge and codebase gotchas
/sessions Switch or manage conversation session history
/models Select active AI model from connected providers
/connect Configure LLM providers and API keys interactively
/cost View token usage statistics and estimated cost breakdown
/lsp Inspect Language Server Protocol diagnostics and status
/diagnose Run autonomous codebase diagnostics on modified files
/miner Switch active mode to MINER knowledge exploration
/workspace Manage multi-repo workspace configurations
/mcp List and manage Model Context Protocol tools
/doc Search official library and framework documentation via Context7
/search-key Configure web search API keys (Tavily/Exa) for documentation research
/agent Switch or manage user-defined custom agent specifications
/worktree Git worktree sandboxing for isolated agent experiments (/worktree <task>, list, merge, clean)
/diff Side-by-side visual diff viewer for modified files
/repair Autonomous pipeline repair doctor for build & test failures
/ask Isolated QA: Ask codebase questions without polluting conversation context
/spec Spec-First Gate: Draft an architectural blueprint contract before editing
/plan View, manage, or archive active task plans (/plan, /plan archive)
/report View or export privacy-safe benchmark and activity reports
/lsp-install LSP binary installation guide for detected project languages
/mode Switch engine mode (/mode builder|planner|miner)
/update Check and perform autonomous in-place self-update to latest release
/clear Clear the terminal chat viewport
/new Start a fresh conversation turn
/help Display help and keyboard shortcuts

Get Started

Choose your preferred installation method.

Installs pre-compiled binary for macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/plumpslabs/bro-code/main/scripts/install.sh | bash

Installs pre-compiled binary for Windows (PowerShell):

irm https://raw.githubusercontent.com/plumpslabs/bro-code/main/scripts/install.ps1 | iex

Install via Go toolchain (requires Go 1.24+):

go install github.com/plumpslabs/bro-code/cmd/brocode@latest

Install via Homebrew tap:

brew tap plumpslabs/tap && brew install brocode

Build from source:

git clone https://github.com/plumpslabs/bro-code.git && cd bro-code && go build -ldflags="-s -w" -o brocode ./cmd/brocode

Supported LLM Providers

Direct API connections with zero proxy dependencies.

Anthropic
Claude 3.7 Sonnet, Claude 3.5 Sonnet, Claude 3.5 Haiku
OpenAI
GPT-5, GPT-4o, o3-mini, GPT-4o-mini
Google Gemini
Gemini 2.5 Flash, Gemini 2.5 Pro (2M Context)
DeepSeek
DeepSeek V3, DeepSeek R1, DeepSeek V4 Pro
Groq & Cerebras
Ultra-fast LPUs & wafer-scale inference engine
Mistral & Cohere
Codestral (256k), Mistral Large, Command R+
SambaNova & GitHub
RDN hardware speed & GitHub Models catalog
Ollama & OpenRouter
Local offline LLMs & 300+ frontier models