βββββββββββββββββββββββββββββββββββββββββββββββββ
β βββββββββββββββββββββββββββββββββββββββββββββ β
β βββββββββββββ ββββββββββββ ββββββββ β
β ββββββββββββ .--. .--. βββββββ β
β ββββββββββββ / \____________/ \ βββββββ β
β ββββββββββββ \ / ββββββ β
β ββββββββββββ | .------..------. | βββββ β
β βββββββββββββ | / .--. \/ .--. \ | βββββ β
β βββββββββββββ | | ( o ) || ( o ) | | βββββ β
β βββββββββββββ | \ '--' /\ '--' / | βββββ β
β βββββββββββββ | '------''------' | βββββ β
β βββββββββββββ | .--. | ββββββ β
β βββββββββββββ | / .. \ | ββββββ β
β βββββββββββββ | \ / | ββββββ β
β βββββββββββββ \ | | / ββββββ β
β ββββββββββββββ \ _| |_ / βββββββ β
β βββββββββββββββ | | | | | | ββββββββ β
β ββββββββββββββββ | | |__| | | βββββββββ β
β βββββββββββββββ | '----' | ββββββββ β
β ββββββββββββββ / \ βββββββ β
β ββββββββββββββ | ___ ___ | βββββββ β
β ββββββββββββββ | / | | \ | βββββββ β
β ββββββββββββββ \ ( | | ) / βββββββ β
β βββββββββββββββ \ \ | | / / ββββββββ β
β ββββββββββββββββ \_\ | | /_/ βββββββββ β
β βββββββββββββββββ | | | | ββββββββββ β
β βββββββββββββββββββ | | | | ββββββββββββ β
β ββββββββββββββββββ / \ / \ βββββββββββ β
β ββββββββββββββββββ (_____)(_____) βββββββββββ β
β ββββββββββββββββββ βββββββββββ β
β βββββββββββββββββββββββββββββββββββββββββββββ β
β G O P H E R M I N D β
βββββββββββββββββββββββββββββββββββββββββββββββββ
A tiny, hackable AI coding agent for your terminal β pointed at your LLM.
GopherMind is a single Go binary that turns any OpenAI-compatible model
into an agentic coding assistant that reads, searches, edits, and runs commands
in your repository β all from a clean terminal UI. It's built to run against a
model you control (local llama.cpp, Ollama, LM Studio, vLLM, or a hosted
endpoint), with safety built in at every layer.
No cloud lock-in. No 200-file framework. Just a small, readable codebase you can actually understand and extend in an afternoon.
- π§ Bring your own model. Anything that speaks the OpenAI
/v1API β your local GPU, a private endpoint over VPN, or OpenAI itself. Models are auto-discovered; switch backends with named provider profiles. - π Safe by default. Every file path is contained to your repo (symlink-aware), shell commands run through a deny-list, and mutating actions hit an approval gate unless you opt into auto mode.
- β‘ Fast, focused loop. Read / search / edit / shell tools drive a compact agent loop with streaming output, a live token + cost meter, retries with backoff, and an optional response cache.
- π₯οΈ A terminal UI that's actually pleasant. Built on Charm β scrollback, syntax-aware rendering, inline approvals, and a gopher that greets you with a fortune.
- πͺΆ Small and hackable. Pure Go, no CGO. Adding a new tool is still one struct and one function β the codebase stays readable even as it grows.
- π§° Batteries included (opt-in). A local semantic index & RAG, a
read-only SQL/Parquet/CSV data toolkit, multi-agent strategies
(
--debate,--samples,--reflexion), an MCP server so any MCP client can drive it, a plugin SDK + WASM sandbox, and observability (Prometheus/metrics, tracing, cost dashboard). Every integration is inert until you configure it.
brew install jbrahy/tap/gophermind # macOS (signed + notarized, no Gatekeeper warnings)
npm install -g gophermind # macOS / Linux / Windows, x64 / arm64The Homebrew build is a signed + notarized universal macOS binary; the npm
package downloads the prebuilt binary for your platform. Linux users can
also grab a .deb/.rpm/.apk (or a .tar.gz) straight from the
latest release;
Windows users a .zip. Every release ships an SBOM and checksums.txt.
Or build from source (Go 1.25+):
git clone https://github.com/jbrahy/gophermind.com
cd gophermind.com
make build # -> ./gophermindgophermind # first run walks you through a setup wizard, then chatsThe wizard asks for your endpoint, an optional API key, a model (picked from a
live list), your approval mode, and a max-iteration budget β then saves it so
later launches go straight to the prompt. Re-run it anytime with
gophermind config.
One-shot, non-interactive use:
gophermind run "add a --json flag to the export command and a test for it"
gophermind ask "how does the retry backoff work?" # read-only, never editsyou βββΆ TUI βββΆ agent loop βββΆ OpenAI-compatible model
β β²
βΌ β tool calls / results
tools (read Β· search Β· edit Β· write Β· shell)
β
safety: path containment Β· shell deny-list Β· approval gate
The model requests tools by name; the harness runs them against your repo
(inside the sandbox), feeds the results back, and repeats until it produces an
answer or hits the iteration budget. That's the whole idea β see
internal/agent and internal/tools.
GopherMind natively speaks PhaseFlow,
a spec-driven development loop: Roadmap β Phases β Plan β Execute β Verify β
Milestone. Workflow state lives under .planning/ (ROADMAP.md, STATE.md,
PROJECT.md, config.json) β the same on-disk model as upstream, so the two
tools are interchangeable.
gophermind phase init "My Project" # scaffold .planning/
gophermind phase roadmap # draft the roadmap (agent)
gophermind phase status # progress + current phase (local)
gophermind phase plan 1 # plan a phase (agent)
gophermind phase execute 1 # execute its plans (agent)
gophermind phase done 01-01 # mark a plan done, sync STATE.md (local)
gophermind phase verify 1 # verify success criteria (agent)
gophermind phase archive v1.0 MVP # snapshot a shipped milestone (local)
The same commands are available in the TUI as /phase <cmd>. Loop steps
(roadmap/plan/execute/verify/milestone, and any embedded PhaseFlow
command by name) run gophermind's agent seeded with the current project state.
The bookkeeping commands (status, next, done, sync, archive) are pure
Go β they update .planning/ deterministically with no model calls, so
progress can never drift from the roadmap's checkboxes. See
internal/phaseflow.
Everything is optional and layered: flags > real env > ./.env > global
config > defaults. Copy .env.example to .env for a fully
documented list, or just run the wizard. Highlights:
| Setting | What it does |
|---|---|
GOPHERMIND_BASE_URL |
Your OpenAI-compatible endpoint (required) |
GOPHERMIND_MODEL |
Model name (empty = auto-discover) |
GOPHERMIND_APPROVAL |
ask (default) or auto |
GOPHERMIND_PROFILE |
Named backend: local-llama, openai, β¦ |
Secure options for internal endpoints (mTLS, custom CA), a response cache,
sampling controls, and JSONL transcript export are all supported β see
.env.example.
Beyond chat/run/ask, the CLI exposes subcommands for sessions, prompts,
plugins, config bundles, the MCP server, benchmarks, diagnostics, and more β
run gophermind --help (and gophermind completion <shell>) for the full list.
We'd love your help. GopherMind ships with a large idea backlog across four
batches (todo.md β todo-4.md) β the batch-4 set
landed in 0.2.0 (MCP server, embeddings, WASM sandbox, packaging, and more), so
the remaining tail is a good source of scoped work. Good first areas: adding a
tool, improving search, a scoop-bucket/winget publish path, or wiring up an
idea from the backlog.
Start with CONTRIBUTING.md. The codebase is test-driven and small enough to hold in your head.
GopherMind is MIT licensed. The startup fortunes come from Brian M. Clapper's fortune database under CC BY 4.0 β see CREDITS.md.