A terminal-native agentic CLI for Go developers β like Claude Code, but built in Go on the Google ADK and Gemini 3.x. One static binary, no Python runtime, project-scoped configuration, first-class support for MCP servers and Claude-compatible skills.
π Full documentation: go-steer.github.io/cogo
- Two modes, one binary.
cogo -p "..."for shell pipelines and CI;cogoon a TTY for an interactive Bubble Tea chat with streaming markdown, slash and@-file palettes, and prompt history. - Project-local configuration. A
.agents/directory holds the model, tool settings, MCP servers, skills, and project memory. Auto-discovered like.git. - Built-in tools.
read_file,write_file,edit_file,list_dir,bash,todoβ the same surface a coding agent expects, with per-tool output caps. - MCP-native. Drop a
.agents/mcp.jsondescribing stdio or HTTP MCP servers and their tools become callable. Schema-driven elicitation modal for servers that prompt the user. - Claude-compatible skills.
SKILL.mdbundles under.agents/skills/<name>/are loaded lazily and exposed as agent tools. - Permissions you can trust. Three modes (
ask/allow/yolo), an in-TUI approval modal, a non-overridable bash denylist (norm -rf /), and path-scope confinement for file tools. - Project memory.
AGENTS.md/CLAUDE.md/GEMINI.mdat the project root +~/.cogo/AGENTS.mduser-global, all merged into the system prompt. - Cost surfacing. Per-turn
βin Β· βout Β· $costfooter, running session total in the header, headless one-line summary on stderr. - Telemetry + transcripts. OpenTelemetry support (
--otel=consoleor OTLP) and an automatically-persisted JSON transcript per session under.agents/sessions/.
Homebrew (recommended):
brew install go-steer/cogo/cogoDocker / OCI (multi-arch image on GHCR):
docker pull ghcr.io/go-steer/cogo:latest
docker run --rm -it -v "$PWD:/work" -w /work ghcr.io/go-steer/cogo:latest -p "hello"go install (HEAD from main):
go install github.com/go-steer/cogo/cmd/cogo@latestPre-built binaries β every GitHub release attaches a tarball per platform:
| Platform | Asset |
|---|---|
| Linux amd64 | cogo_<version>_linux_amd64.tar.gz |
| Linux arm64 | cogo_<version>_linux_arm64.tar.gz |
| macOS Intel | cogo_<version>_darwin_amd64.tar.gz |
| macOS Apple Silicon | cogo_<version>_darwin_arm64.tar.gz |
A checksums.txt (SHA256) ships in every release. The install docs include an auto-detect installer one-liner and a verification snippet.
Verify after install: cogo --version.
Cogo speaks Gemini through one of two auth paths:
# Option A β Vertex AI
gcloud auth application-default login
export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_CLOUD_PROJECT=your-project
export GOOGLE_CLOUD_LOCATION=us-central1 # or "global"
# Option B β Public Gemini API
export GOOGLE_API_KEY=...(See .env.example for a copy-pasteable template.)
Then either:
# Interactive TUI
cogo
# One-shot, pipeable
cogo -p "Summarize internal/agent in three bullets."Want a fresh project bootstrapped? cogo init writes .agents/{config.json, .gitignore, AGENTS.md} with sensible defaults; cogo init --interactive walks a wizard for provider / model / permission mode.
Cogo looks for a .agents/ directory by walking up from the current working directory (same way Git finds .git). Layout:
.agents/
βββ config.json # model, provider, permission mode, path scope, OTEL
βββ mcp.json # MCP server definitions (stdio + Streamable HTTP)
βββ skills/ # one subdir per skill, each with a SKILL.md
β βββ example/SKILL.md
βββ AGENTS.md # project memory (CLAUDE.md / GEMINI.md also accepted)
βββ sessions/ # transcripts, written on /quit and Ctrl+C
βββ logs/ # JSONL debug logs (when --debug is set)
When no .agents/ is present Cogo runs with built-in defaults β useful for quick one-offs in arbitrary directories.
| Command | Effect |
|---|---|
/help |
Full keymap + command list. |
/memory |
Show which memory files were loaded and from where. |
/stats |
Per-session token + cost breakdown. |
/model |
Open the model picker, or /model <id> to switch directly. |
/mcp |
List configured MCP servers + each server's tools. |
/skills |
List discovered skills. |
/reload |
Re-read .agents/ from disk and rebuild the agent in place (no chat reset). |
/clear |
Clear chat history (with confirmation). |
/quit |
Exit cleanly, persisting a session transcript. |
Type / at the start of an empty prompt to open the slash palette; type @ anywhere to inline a file by path.
Three modes set in .agents/config.json under permissions.mode:
askβ prompt before any mutating tool call (default).allowβ pre-approve the listed tool patterns; prompt for everything else.yoloβ no prompts. Use sparingly; the bash denylist still blocks the truly dangerous commands.
When the modal appears: y allow once, s allow this session, a always allow (persisted to .agents/config.json), n or Esc deny.
File-touching tools are scoped to the project root + ~/.cogo/ plus any path_scope.allow glob patterns you add. Out-of-scope reads via @<path> still work but surface a one-line warning so private files don't end up in the model context by accident.
Drop a JSON file at .agents/mcp.json:
{
"version": 1,
"servers": {
"filesystem": {
"transport": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/work"]
},
"github": {
"transport": "http",
"url": "https://mcp.example.com/v1",
"headers": { "Authorization": "Bearer ${env:GITHUB_TOKEN}" }
}
}
}Tools are namespaced as <server>_<tool> so they never collide with built-ins. /mcp shows status and tool inventory.
Skills follow Claude Code's bundle layout β drop .agents/skills/<name>/SKILL.md (with frontmatter name: + description:) and the agent will discover and invoke it. Body markdown is loaded on demand.
- OpenTelemetry β set
cfg.OTEL.Exportertonone(default),console, orotlp. Withotlp, pointOTEL_EXPORTER_OTLP_ENDPOINTat your collector. Spans cover the agent loop, tool calls, and provider requests. - Session transcripts β every interactive session writes
.agents/sessions/<timestamp>.jsonon exit, with the full message log and usage totals. - Debug logs β
cogo --debug -p "..."swaps the slog handler to a JSONL writer under.agents/logs/<timestamp>.jsonlfor after-the-fact inspection.
If you run cogo inside VS Code's integrated terminal and see characters dropping out of typed input or rendered output β most often the CSI command terminators (D, b, n are the usual suspects, but other letters can vanish too) β you're hitting a known interaction between Bubble Tea's escape sequences and VS Code's WebGL terminal renderer.
The fix is one VS Code setting, not a cogo config:
β+,(orCtrl+,) to open Settings.- Search for
gpuAcceleration. - Change Terminal βΊ Integrated: Gpu Acceleration from
autotocanvas. - Close and reopen the terminal panel and rerun cogo.
If canvas doesn't fully resolve it, try off. The perf cost in either case is invisible for an interactive TUI like cogo. This isn't cogo-specific β most Bubble Tea TUIs hit the same WebGL renderer bug.
The full local CI pipeline lives under dev/ and is the same source of truth as the GitHub Actions workflow. Quick start:
dev/tools/ci # run every check (format, vet, build, lint, mod-tidy, tests, vuln)
dev/tools/fix-go-format # auto-fix formattingMissing tools (golangci-lint, goimports, govulncheck) auto-install on first use; only prereq is a Go toolchain. See dev/README.md for the full layout, contributor checklist, and license-header rules.
End-to-end Vertex tests are gated on COGO_E2E=1 plus the same auth env vars used by the runtime:
COGO_E2E=1 \
GOOGLE_GENAI_USE_VERTEXAI=true \
GOOGLE_CLOUD_PROJECT=... \
GOOGLE_CLOUD_LOCATION=... \
go test ./internal/headless/... -run E2E -vROADMAP.mdβ release themes (v0.2.0 β v0.5.0) and links to the GitHub milestones.CONTRIBUTING.mdβ how to file issues, the PR workflow, DCO sign-off, commit conventions.CODE_OF_CONDUCT.mdβ Contributor Covenant v2.1.docs/REQUIREMENTS.mdβ V1 scope, functional & non-functional requirements.docs/DESIGN.mdβ architecture, configuration, module layout, testing strategy.AGENTS.mdβ project memory thatcogoitself loads when run inside this repo.
Apache 2.0 β see LICENSE.