Skip to content

yanmxa/gencode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

Download Binary

OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -sL "https://github.com/yanmxa/gencode/releases/latest/download/gen_${OS}_${ARCH}.tar.gz" | tar xz
sudo mv gen /usr/local/bin/

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

🔗 Related Projects

  • Claude Code — Anthropic's AI coding assistant
  • Aider — AI pair programming in terminal
  • Continue — Open-source AI code assistant

📄 License

MIT License - see LICENSE for details.

Packages

No packages published

Contributors 2

  •  
  •