Open-source AI coding assistant for the terminal
An open-source AI coding assistant for the terminal. Multi-provider support, flexible context management, compatible with Claude Code extensions and plugins.
- Multi-provider — Anthropic, OpenAI, Gemini, Moonshot, etc. — switch with
/provider - Tools — Built-in (Edit, Bash, WebSearch, etc.) + MCP, dynamic enable/disable for context control
- Skills — Model visibility control (off/command/aware), Claude Code compatible
- Session — Persist, resume, search, auto-cleanup, with context compact
- Others — Subagents, plan mode, task management, hooks, etc.
| Provider | Models | Auth | Environment Variables |
|---|---|---|---|
| Anthropic | Claude Opus 4, Sonnet 4, Haiku 3.5 | API Key / Vertex AI | ANTHROPIC_API_KEY |
| OpenAI | GPT-5.2, GPT-5, o3, o4-mini, Codex | API Key | OPENAI_API_KEY |
| Gemini 3 Pro/Flash, 2.5 Pro/Flash | API Key | GOOGLE_API_KEY |
|
| Moonshot | Kimi K2.5, K2 Thinking | API Key | MOONSHOT_API_KEY |
| Alibaba | Qwen 3, Qwen 2.5 | Planning | — |
curl -fsSL https://raw.githubusercontent.com/yanmxa/gencode/main/install.sh | bashRe-run the same command to upgrade. To uninstall:
curl -fsSL https://raw.githubusercontent.com/yanmxa/gencode/main/install.sh | bash -s uninstallOther methods
Go Install
go install github.com/yanmxa/gencode/cmd/gen@latestBuild from Source
git clone https://github.com/yanmxa/gencode.git
cd gencode
go build -o gen ./cmd/gen
mkdir -p ~/.local/bin && mv gen ~/.local/bin/# Interactive mode
gen
# Non-interactive mode
gen "explain this function"
cat main.go | gen "review this code"
# Resume previous session
gen --continue # Resume most recent
gen --resume # Select from list- Run
gento start interactive mode - Use
/providerto connect to an LLM provider - Use
/modelto select a model - Start chatting!
GenCode stores configuration in ~/.gen/:
~/.gen/
├── providers.json # Provider connections and current model
├── settings.json # User settings
├── skills.json # Skill states
├── sessions/ # Saved conversation sessions
├── skills/ # Custom skills
└── agents/ # Custom agents
- Claude Code — Anthropic's AI coding assistant
- Aider — AI pair programming in terminal
- Continue — Open-source AI code assistant
Contributions welcome! See CONTRIBUTING.md for guidelines.
Apache License 2.0 - see LICENSE for details.