Skip to content
/ tengu Public

A powerful AI coding agent CLI that unifies multiple LLMs

License

Notifications You must be signed in to change notification settings

izuno4t/tengu

Repository files navigation

👺 Tengu

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.

✨ Features

  • 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.md files for project context

🚀 Quick Start

Installation

# Via Cargo (recommended)
cargo install tengu

# From source
git clone https://github.com/yourusername/tengu.git
cd tengu
cargo build --release

Setup

# Set API keys
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."

Basic Usage

# 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"

📖 Examples

File Operations

# 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:*)"

MCP Servers

# 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"

Custom Agents

# List agents
tengu agent list

# Use specific agent
tengu --agent code-reviewer

# Create new agent
tengu agent create my-agent

CI/CD

# GitHub Actions example
- name: Auto-fix lint
  run: |
    tengu -p "Run lint and fix errors" \
      --allowed-tools "Read,Write,Edit,Bash(cargo:*)"

⚙️ Configuration

See config.toml.example and AGENT.md.example for full configuration options.

Basic Config (~/.tengu/config.toml)

[model]
provider = "anthropic"
default = "claude-sonnet-4-20250514"

[permissions]
approval_policy = "on-request"
allowed_tools = ["Read", "Write", "Bash(git *)"]

TUI Theme (~/.tengu/theme.toml)

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 (./AGENT.md)

# Project Context

## Coding Standards
- Language: Rust 2021
- Follow clippy recommendations
- Document all public functions

🤝 Contributing

Contributions are welcome! See CONTRIBUTING.md for details.

📄 License

MIT License - see LICENSE for details.

🙏 Acknowledgments

Inspired by:


Soar high like a Tengu, command AI with ease 👺

About

A powerful AI coding agent CLI that unifies multiple LLMs

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages