🖥 gptme:4.3k Stars 的终端 AI Agent,比 Claude Code 更早出生
项目地址:github.com/gptme/gptme | ⭐ 4,304 | 🛠 Python | 作者 Erik Bjäreholt
老实说,Claude Code、Codex、Cursor 这些 AI 编程助手虽然好用,但你要么得装个 IDE,要么就得用 Anthropic 生态的东西。那如果你就想在终端里干活,或者跑在 headless 服务器上呢?
gptme 这玩意儿 2023 年春天就出生了,比 Claude Code 早了快两年。一个纯终端的 AI Agent,装哪都能跑——笔记本、SSH 会话、tmux、CI 流水线,甚至完全离线的 llama.cpp 本地模型。
🚀 一行命令开搞
# pipx 安装(推荐)
pipx install gptme
# 带浏览器功能
pipx install 'gptme[browser]'
# 直接启动
gptme
装完直接 gptme 回车,就能在终端里跟 AI 对话了。支持 Anthropic、OpenAI、Google、DeepSeek、xAI,以及 OpenRouter 上 100+ 模型。
⚡ 最骚的操作:完整的终端工具集
别的 AI 助手还在纠结能不能跑代码的时候,gptme 已经自带了一整套终端工具:
# 写代码 & 跑代码
gptme 'write an impressive particle effect using three.js to particles.html'
# 处理文件
gptme 'convert to h265 and adjust the volume' video.mp4
# 修测试
make test | gptme 'fix the failing tests'
# 非交互模式(CI 友好)
gptme -n 'run the test suite and fix any failing tests'
最骚的是 gptme --non-interactive --output-format json——输出 JSONL,可以直接被其他进程消费,拿来搭自动化流水线贼方便。
🔌 插件 & MCP & ACP
gptme 的扩展性是我见过最灵活的之一:
# ~/.config/gptme/config.toml
[plugins]
paths = ["~/.config/gptme/plugins", "./plugins"]
enabled = ["my_plugin"]
它支持 MCP(Model Context Protocol)——任何 MCP 服务器都能当工具源。还支持 ACP(Agent Client Protocol),可以直接在 Zed 或 JetBrains 里当 coding agent 用:
pipx install 'gptme[acp]'
🤖 持久化 Autonomous Agent
gptme 不只是个交互式 CLI——它能跑成长期运行的自主 Agent。gptme-agent-template 这模板给你搭好了 git 跟踪的"大脑"、定时任务、任务队列、多 Agent 协调。
有个叫 Bob 的参考实现从 2024 年底一直在跑,开 PR、修 CI、回 Discord、写博客,全自动。
gptme-agent create ~/my-agent --name MyAgent
gptme-agent install # 配置定时运行
gptme-agent status # 查看状态
🧠 深度思考
对比 Claude Code 和 Codex,gptme 的优势不在"更聪明"——它背后的模型取决于你自己选。优势在于:
- 环境无关——有终端就能跑,SSH、tmux、Docker 都行
- 本地模型优先——llama.cpp 跑本地模型不需要 API Key,数据不出机器
- 扩展体系完整——Plugins / Skills / Lessons / Hooks 四层扩展,从轻量到深度定制都有
- 出生最早——2023 年的项目,踩过的坑比后来者多得多
总结
- 纯终端 AI Agent,pipx 安装即用
- 支持 10+ LLM 提供商,包括完全本地模型
- 内置 shell、Python、浏览器、截图等完整工具集
- 插件 + MCP + ACP 三层扩展,编辑器、自定义工具都能接
- 可以跑成持久化自主 Agent,适合自动化运维和 CI
如果你跟我一样,大部分时间泡在终端里,gptme 值得一试。别整那些花里胡哨的 IDE 插件了,终端里就能搞定的事,何必多开一个窗口?
🖥 gptme: 4.3k Stars Terminal AI Agent — Born Before Claude Code
Project: github.com/gptme/gptme | ⭐ 4,304 | 🛠 Python | By Erik Bjäreholt
Let's be honest — Claude Code, Codex, and Cursor are great, but you either need an IDE or you're locked into the Anthropic ecosystem. What if you just want to work in the terminal, or on a headless server?
gptme was born in Spring 2023 — almost two years before Claude Code. A pure terminal AI agent that runs anywhere a terminal runs: laptops, SSH sessions, tmux, CI pipelines, even fully local with llama.cpp.
🚀 Install & Run
pipx install gptme
pipx install 'gptme[browser]' # with web browsing
gptme
Works with Anthropic, OpenAI, Google, DeepSeek, xAI, OpenRouter (100+ models), and local models.
⚡ Rich Built-in Toolset
# Write and run code
gptme 'write an impressive particle effect using three.js to particles.html'
# Process files
gptme 'convert to h265 and adjust the volume' video.mp4
# Fix failing tests
make test | gptme 'fix the failing tests'
# Non-interactive mode for CI
gptme -n 'run the test suite and fix any failing tests'
Output JSONL with --non-interactive --output-format json for machine-readable automation.
🔌 Extensibility: Plugins, MCP & ACP
# ~/.config/gptme/config.toml
[plugins]
paths = ["~/.config/gptme/plugins", "./plugins"]
enabled = ["my_plugin"]
- MCP: Use any MCP server as a tool source
- ACP: Use gptme as a coding agent in Zed/JetBrains (
pipx install 'gptme[acp]') - Plugins/Skills/Lessons/Hooks: Four layers of extensibility
🤖 Persistent Autonomous Agents
gptme can run as a long-running autonomous agent with gptme-agent-template — git-tracked workspace, cron schedules, task queues, multi-agent coordination.
Bob (reference implementation) has been running since late 2024 — opening PRs, fixing CI, managing tasks, writing blog posts.
Summary
- Pure terminal AI agent, one command to install
- 10+ LLM providers including fully local models
- Built-in shell, Python, browser, screenshot tools
- Plugins + MCP + ACP extensibility stack
- Can run as persistent autonomous agent for DevOps/CI