gencode

module
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT

README ΒΆ

GenCode

Open-source AI assistant for the terminal

Release Go Report Card Go Reference License

GenCode is an AI assistant that lives in your terminal. Multi-provider support, built-in tools, and a flexible skill/agent system compatible with Claude Code.

✨ Features

  • Multi-provider Support β€” Anthropic Claude, OpenAI GPT, Google Gemini (API key & Vertex AI)
  • Built-in Tools β€” Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch
  • Skills System β€” Reusable prompts with 3 states: disabled, enabled (slash command), active (model-aware)
  • Subagents β€” Specialized agents (Explore, Plan, Bash, Review) for autonomous task execution
  • Session Persistence β€” Save, resume, and manage conversation sessions
  • Non-interactive Mode β€” Pipe input or pass messages directly for scripting

πŸš€ Installation

curl -fsSL https://raw.githubusercontent.com/yanmxa/gencode/main/install.sh | bash

Re-run the same command to upgrade. To uninstall:

curl -fsSL https://raw.githubusercontent.com/yanmxa/gencode/main/install.sh | bash -s uninstall
Other methods

Go Install

go install github.com/yanmxa/gencode/cmd/gen@latest

Build from Source

git clone https://github.com/yanmxa/gencode.git
cd gencode
go build -o gen ./cmd/gen
sudo mv gen /usr/local/bin/

πŸ“– Usage

# 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

Quick Start

  1. Run gen to start interactive mode
  2. Use /provider to connect to an LLM provider
  3. Use /model to select a model
  4. Start chatting!

Commands

Command Description
/provider Connect to an LLM provider
/model Select a model
/tools List available tools
/skills Manage skills (disable/enable/active)
/agents List available agents
/clear Clear chat history
/help Show all commands

Keyboard Shortcuts

Key Action
Enter Send message
Alt+Enter Insert newline
↑/↓ Navigate history
Esc Stop AI response
Ctrl+C Clear input / Quit

πŸ”§ Configuration

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

Environment Variables

Variable Description
ANTHROPIC_API_KEY Anthropic API key
OPENAI_API_KEY OpenAI API key
GOOGLE_API_KEY Google AI API key
GEN_DEBUG Set to 1 to enable debug logging

πŸ› οΈ Built-in Tools

Tool Description
Read Read file contents
Write Create or overwrite files
Edit Edit files with diff preview
Bash Execute shell commands
Glob Find files by pattern
Grep Search file contents
WebFetch Fetch web page content
WebSearch Search the web
Task Spawn subagents for complex tasks
Skill Invoke custom skills
  • Claude Code β€” Anthropic's AI coding assistant
  • Aider β€” AI pair programming in terminal
  • Continue β€” Open-source AI code assistant

🀝 Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

πŸ“„ License

MIT License - see LICENSE for details.

Directories ΒΆ

Path Synopsis
cmd
gen command
internal
agent
Package agent provides agent (subagent) execution for GenCode.
Package agent provides agent (subagent) execution for GenCode.
config
Package config provides multi-level settings management for GenCode.
Package config provides multi-level settings management for GenCode.
hooks
Package hooks implements the event hooks system for GenCode.
Package hooks implements the event hooks system for GenCode.
log
mcp
Package mcp implements Model Context Protocol (MCP) client functionality.
Package mcp implements Model Context Protocol (MCP) client functionality.
mcp/transport
Package transport provides transport implementations for MCP protocol.
Package transport provides transport implementations for MCP protocol.
plan
Package plan provides plan mode functionality for GenCode.
Package plan provides plan mode functionality for GenCode.
skill
Package skill provides skill management for GenCode.
Package skill provides skill management for GenCode.
system
Package system provides system prompt construction for GenCode.
Package system provides system prompt construction for GenCode.
tui

Jump to

Keyboard shortcuts

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