gptme
/ʤiː piː tiː miː/
Getting Started
•
GitHub
•
Documentation
📜 Personal AI agent in your terminal, with tools so it can:
Use the terminal, run code, edit files, browse the web, use vision, and much more;
a great coding agent, but is general-purpose to assists in all kinds of knowledge-work.
An unconstrained local free and open-source alternative to Claude Code, Codex, Cursor Agents, etc.
One of the first agent CLIs created (Spring 2023) that is still in active development.
📚 Table of Contents
📢 News
- Coming soon - gptme.ai service for running agents in the
cloud; gptme desktop
app for easy local use.
- 2026-01 - gptme-agent-template
v0.4: Bob reaches 1000+
autonomous sessions, autonomous run loops, enhanced context
generation
- 2025-12 - v0.31.0:
Background jobs, form tool, cost tracking, content-addressable
storage
- 2025-11 - v0.30.0:
Plugin system, context compression, subagent planner mode
- 2025-10 - v0.29.0:
Lessons system for contextual guidance, MCP discovery & dynamic
loading, token awareness; Bob begins autonomous runs
with GitHub monitoring
- 2025-08 - v0.28.0:
MCP support, morph tool for fast edits, auto-commit, redesigned server
API
- 2025-03 - v0.27.0:
Pre-commit integration, macOS computer use, Claude 3.7 Sonnet, DeepSeek
R1, local TTS with Kokoro
- 2025-01 - gptme-contrib created:
community plugins including Twitter/X, Discord bot, email tools,
consortium (multi-agent)
- 2024-12 - gptme-agent-template
v0.3: Template for persistent agents
- 2024-11 - Ecosystem expansion: gptme-webui, gptme-rag, gptme.vim, Bob created (first
autonomous agent)
- 2024-10 - First viral
tweet bringing widespread attention
- 2024-08 - Show HN,
Anthropic Claude support, tmux tool
- 2023-09 - Initial public
release on HN, Reddit,
Twitter
- 2023-03 - Initial
commit - one of the first agent CLIs
For more history, see the Timeline and Changelog.
🎥 Demos
These demos are very out of date (2023) and do not reflect the latest
capabilities.
| Fibonacci |
Snake with curses |
|

Steps
- Create a new dir 'gptme-test-fib' and git init
- Write a fib function to fib.py, commit
- Create a public repo and push to GitHub
|

Steps
- Create a snake game with curses to snake.py
- Running fails, ask gptme to fix a bug
- Game runs
- Ask gptme to add color
- Minor struggles
- Finished game with green snake and red apple pie!
|
| Mandelbrot with curses |
Answer question from URL |
|

Steps
- Render mandelbrot with curses to mandelbrot_curses.py
- Program runs
- Add color
|

Steps
- Ask who the CEO of Superuser Labs is, passing website URL
- gptme browses the website, and answers correctly
|
| Terminal UI |
Web UI |
Features
- Powerful terminal interface
- Convenient CLI commands
- Diff & Syntax highlighting
- Tab completion
- Command history
|
Features
- Chat with gptme from your browser
- Access to all tools and features
- Modern, responsive interface
- Self-hostable
- Available at chat.gptme.org
|
You can find more Demos and Examples in the documentation.
🌟 Features
- 💻 Code execution
- Executes code in your local environment with the shell and python tools.
- 🧩 Read, write, and change files
- Makes incremental changes with the patch tool.
- 🌐 Search and browse the web.
- Can use a browser via Playwright with the browser tool.
- 👀 Vision
- Can see images referenced in prompts, screenshots of your desktop,
and web pages.
- 🔄 Self-correcting
- Output is fed back to the assistant, allowing it to respond and
self-correct.
- 📚 Lessons system
- Contextual guidance and best practices automatically included when
relevant
- Keyword and tool-based matching
- Adapts to interactive vs autonomous modes
- 🤖 Support for several LLM providers
- Use OpenAI, Anthropic, OpenRouter, or serve locally with
llama.cpp
- 🌐 Web UI and REST API
- Modern web interface at chat.gptme.org (gptme-webui)
- Simple built-in web UI included in the Python package
- Server with REST
API
- Standalone executable builds available with PyInstaller
- 💻 Computer
use tool, as hyped by Anthropic
(see #216)
- Give the assistant access to a full desktop, allowing it to interact
with GUI applications.
- 🤖 Long-running agents and advanced agent architectures (see #143 and #259)
- ✨ Many smaller features to ensure a great experience
- 🚰 Pipe in context via
stdin or as arguments.
- Passing a filename as an argument will read the file and include it
as context.
- → Smart completion and highlighting:
- Tab completion and highlighting for commands and paths
- 📝 Automatic naming of conversations
- ✅ Detects and integrates pre-commit
- 🗣️ Text-to-Speech support,
locally generated using Kokoro
- 🔊 Tool sounds: Pleasant notification sounds for different tool
operations
- Enable with
GPTME_TOOL_SOUNDS=true
- Different sounds for shell commands, file operations, screenshots,
etc.
- 🎯 Feature flags for advanced usage, see configuration docs
🛠 Use Cases
- 🖥 Development: Write and run code faster with AI
assistance.
- 🎯 Shell Expert: Get the right command using
natural language (no more memorizing flags!).
- 📊 Data Analysis: Process and analyze data directly
in your terminal.
- 🎓 Interactive Learning: Experiment with new
technologies or codebases hands-on.
- 🤖 Agents & Tools: Experiment with agents &
tools in a local environment.
🛠 Developer perks
- ⭐ One of the first agent CLIs created (Spring 2023) that is still
in active development.
- 🧰 Easy to extend
- Most functionality can be implemented with tools, hooks, and commands, making it easy
to add new features.
- Trying to stay tiny.
- Plugins allow for
easy packaging of extensions.
- 🧪 Extensive testing, high coverage.
- 🧹 Clean codebase, checked and formatted with
mypy,
ruff, and pyupgrade.
- 🤖 GitHub Bot to
request changes from comments! (see #16)
- Operates in this repo! (see #18 for
example)
- Runs entirely in GitHub Actions.
- 📊 Evaluation suite
for testing capabilities of different models
- 📝 gptme.vim for
easy integration with vim
🚧 In progress
- 🌳 Tree-based conversation structure (see #17)
- 📜 RAG to automatically include context from local files (see #59)
- 🏆 Advanced evals for testing frontier capabilities
🚀 Getting Started
Install with pipx:
# requires Python 3.10+
pipx install gptme
Now, to get started, run:
Here are some examples:
gptme 'write an impressive and colorful particle effect using three.js to particles.html'
gptme 'render mandelbrot set to mandelbrot.png'
gptme 'suggest improvements to my vimrc'
gptme 'convert to h265 and adjust the volume' video.mp4
git diff | gptme 'complete the TODOs in this diff'
make test | gptme 'fix the failing tests'
For more, see the Getting Started
guide and the Examples in the documentation.
🛠 Usage
$ gptme --help
Usage: gptme [OPTIONS] [PROMPTS]...
gptme is a chat-CLI for LLMs, empowering them with tools to run shell
commands, execute code, read and manipulate files, and more.
If PROMPTS are provided, a new conversation will be started with it. PROMPTS
can be chained with the '-' separator.
The interface provides user commands that can be used to interact with the
system.
Available commands:
/undo Undo the last action
/log Show the conversation log
/edit Edit the conversation in your editor
/rename Rename the conversation
/fork Create a copy of the conversation
/summarize Summarize the conversation
/replay Replay tool operations
/export Export conversation as HTML
/model List or switch models
/tokens Show token usage and costs
/context Show context token breakdown
/tools Show available tools
/commit Ask assistant to git commit
/compact Compact the conversation
/impersonate Impersonate the assistant
/restart Restart gptme process
/setup Setup gptme
/help Show this help message
/exit Exit the program
See docs for all commands: https://gptme.org/docs/commands.html
Keyboard shortcuts:
Ctrl+X Ctrl+E Edit prompt in your editor
Ctrl+J Insert a new line without executing the prompt
Options:
--name TEXT Name of conversation. Defaults to generating a random
name.
-m, --model TEXT Model to use, e.g. openai/gpt-5, anthropic/claude-
sonnet-4-20250514. If only provider given then a
default is used.
-w, --workspace TEXT Path to workspace directory. Pass '@log' to create a
workspace in the log directory.
--agent-path TEXT Path to agent workspace directory.
-r, --resume Load most recent conversation.
-y, --no-confirm Skip all confirmation prompts.
-n, --non-interactive Non-interactive mode. Implies --no-confirm.
--system TEXT System prompt. Options: 'full', 'short', or something
custom.
-t, --tools TEXT Tools to allow as comma-separated list. Available:
append, browser, chats, choice, computer, gh,
ipython, morph, patch, rag, read, save, screenshot,
shell, subagent, tmux, tts, vision, youtube.
--tool-format TEXT Tool format to use. Options: markdown, xml, tool
--no-stream Don't stream responses
--show-hidden Show hidden system messages.
-v, --verbose Show verbose output.
--version Show version and configuration information
--help Show this message and exit.
📊 Stats
⭐ Stargazers over time

📈 Download Stats
🔗 Links