A powerful AI coding agent CLI that unifies multiple LLMs
Tengu is a flexible, multi-LLM coding agent that integrates with MCP servers, supports custom agents, and provides fine-grained permission control for your development workflow.
- Multi-LLM Support: OpenAI, Anthropic, Google, and local models
- MCP Integration: Connect to Model Context Protocol servers
- Custom Agents: Define specialized agents with custom prompts and tools
- Permission Control: Fine-grained tool permissions with glob patterns
- Hooks & Automation: Pre/post-execution hooks for workflow automation
- Project Configuration: Hierarchical
AGENT.mdfiles for project context
# Via Cargo (recommended)
cargo install tengu
# From source
git clone https://github.com/yourusername/tengu.git
cd tengu
cargo build --release# Set API keys
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."# Interactive TUI mode
tengu
# One-shot execution
tengu -p "Analyze this codebase"
# With specific model
tengu --model claude-sonnet-4 -p "Write tests"
# Allow file editing
tengu -p "Fix bugs" --allowed-tools "Read,Write,Edit"# Create new file
tengu -p "Create utils.rs with helper functions" --allowed-tools "Write"
# Edit existing files
tengu -p "Fix lint errors in all .rs files" --allowed-tools "Read,Write,Edit,Bash(cargo:*)"# Add PostgreSQL MCP server
tengu mcp add postgres -- npx @modelcontextprotocol/server-postgres postgresql://localhost/mydb
# Use MCP in queries
tengu -p "Get latest 10 users from database"# List agents
tengu agent list
# Use specific agent
tengu --agent code-reviewer
# Create new agent
tengu agent create my-agent# GitHub Actions example
- name: Auto-fix lint
run: |
tengu -p "Run lint and fix errors" \
--allowed-tools "Read,Write,Edit,Bash(cargo:*)"See config.toml.example and AGENT.md.example for full configuration options.
[model]
provider = "anthropic"
default = "claude-sonnet-4-20250514"
[permissions]
approval_policy = "on-request"
allowed_tools = ["Read", "Write", "Bash(git *)"]TUI colors can be overridden by placing a theme file at ~/.tengu/theme.toml.
Only keys you set are overridden; others fall back to src/tui/theme.toml.
user = "green"
assistant = "white"
system = "white"
status = "yellow"
queue = "dark_grey"
heading = "cyan"
inline_code = "cyan"
divider = "grey"
footer = "grey"# Project Context
## Coding Standards
- Language: Rust 2021
- Follow clippy recommendations
- Document all public functionsContributions are welcome! See CONTRIBUTING.md for details.
MIT License - see LICENSE for details.
Inspired by:
- Claude Code - Anthropic
- Codex CLI - OpenAI
- Aider
- Model Context Protocol
Soar high like a Tengu, command AI with ease 👺