π monkey

Your monkey in the terminal. No browser, no copy-pasting β just ask and get things done.
Monkey is an agentic AI assistant that lives where you work. It reads your code, edits files, runs commands, and searches the web. You stay in the terminal; monkey does the rest.

Why monkey?
- No context switching β ask Monkey to fix a bug and it edits the file, right there
- Fully agentic β Monkey can read, write, run commands, and browse the web on your behalf; you approve each action
- Works the way you do β interactive TUI for exploration, one-shot CLI for scripting and pipes
- Project-aware β drop a
MONKEY.md in any repo to give Monkey permanent context about your codebase
Get started
curl -fsSL https://monkeycli.com/install.sh | sh
export ANTHROPIC_API_KEY="your-api-key"
monkey
That's it. Monkey picks the latest Claude model automatically.
What it can do
- Edits your files β Monkey reads your code, makes targeted changes, and shows you a diff before applying
- Runs commands β execute shell commands with your approval; ideal for build errors, test failures, or quick scripts
- Searches the web β fetch pages and search DuckDuckGo without leaving your session
- Remembers conversations β resume any session with
--continue; never lose a thread
- Switches models on the fly β jump between Opus, Sonnet, and Haiku mid-conversation with
/model
- Handles long conversations β
/compact summarizes and compresses history so you never hit context limits
Common workflows
# Fix a bug β monkey reads the file, proposes a fix, applies it
monkey -p "nil pointer panic in api/client.go line 83, fix it"
# Summarize a diff for a PR description
git diff main | monkey -p "write a pull request description for these changes"
# Research and write
monkey -p "find the top Go HTTP routers and write a comparison to docs/routers.md"
# Quick question while staying in flow
monkey -p "what does SIGTERM do vs SIGKILL"
# Pick up where you left off
monkey --continue
Installation
One-liner (recommended)
curl -fsSL https://monkeycli.com/install.sh | sh
go install
go install github.com/juanhuttemann/monkey-cli@latest
From source
git clone https://github.com/juanhuttemann/monkey-cli.git
cd monkey-cli
go build -o monkey .
Requires Go 1.25 or later.
Updating
monkey update
Checks GitHub for the latest release and replaces the current binary in-place if a newer version is available.
Setup
The only required variable is your API key:
export ANTHROPIC_API_KEY="your-api-key"
Monkey defaults to the latest Claude model automatically. You can pin specific models if needed:
| Variable |
Required |
Description |
ANTHROPIC_API_KEY |
yes |
Your Anthropic API key |
ANTHROPIC_BASE_URL |
no |
Override the API base URL (default: https://api.anthropic.com) |
ANTHROPIC_DEFAULT_OPUS_MODEL |
no |
Pin a specific Opus model ID |
ANTHROPIC_DEFAULT_SONNET_MODEL |
no |
Pin a specific Sonnet model ID |
ANTHROPIC_DEFAULT_HAIKU_MODEL |
no |
Pin a specific Haiku model ID |
The active model defaults to the first one set, in order: Opus β Sonnet β Haiku.
monkey also works with any Anthropic-compatible provider β Kimi, MiniMax, GLM, and others. Just point it at your provider's endpoint, set your API key, and map the model slots to that provider's model IDs.
You can also configure monkey via ~/.config/monkey/config.toml.
Usage
Interactive TUI
monkey
| Key |
Action |
/ape |
Unleash mode β Monkey acts without asking for approval on every tool call |
Enter |
Send message |
Ctrl+J |
Insert a newline (multiline input) |
/model + Enter |
Switch between Opus, Sonnet, and Haiku |
/compact |
Summarize and compress history to stay under context limits |
/copy |
Copy last response to clipboard |
/clear |
Start a new session |
Esc / Ctrl+C |
Quit |
/exit |
Quit via slash command |
One-shot CLI
monkey -p "Why do monkeys make the best programmers?"
# Pipe input
monkey -p "summarise this" < file.txt
# Unquoted prompts work too
monkey -p Write a haiku about bananas
# Resume the last session
monkey --continue
Custom system prompt
Create a MONKEY.md in your project root and monkey will load it as the system prompt for every conversation in that directory. Use it to give Claude context about your stack, conventions, or anything else it should always know.
A global default lives at ~/.config/monkey/MONKEY.md.
When Monkey needs to take action, it calls one of these built-in tools. Each call shows a confirmation prompt β or use /ape to auto-approve everything.
| Tool |
What it does |
bash |
Run a shell command |
read |
Read a file |
write |
Create or overwrite a file |
edit |
Make targeted edits to a file |
glob |
Find files by pattern |
grep |
Search file contents |
web_search |
Search the web via DuckDuckGo |
web_fetch |
Fetch and extract text from a URL |
Running tests
go test ./...
Contributing
Contributions are welcome! Open an issue first to discuss what you'd like to change. See CONTRIBUTING.md for guidelines.
License
MIT Β© Juan Huttemann