gptme CLI Cheatsheet - Terminal AI Agent Full Reference
gptme is a personal agent that lives in the terminal and carries its own shell, Python, web and vision tools. It reads files, runs commands and fans out to sub-agents without pinning you to one provider. What separates it from a chat assistant is that it acts rather than advises, which means the two things that decide whether it helps are context and permissions. Index the project so retrieval carries your codebase into the conversation, and grant or revoke individual tools with +tool and -tool rather than enabling everything, especially anywhere the run is unattended. For scripting, -y removes the interactive confirmation and --output-format json returns structured output; together they are the prerequisite for wiring it into CI or a long-running job. Sections cover basic conversation, tools and context, and session and tool management. Because it runs commands, treat prompts as input to a program under your control: prefer narrow tool grants, and read the output before piping it into anything else.
Basic Chat 6
gptme "hello"gptme "fix TODOs" main.pygptme -m anthropic/claude-sonnet-4-20250514gptme -y "run tests and fix"gptme -n "summarize git diff"gptme --output-format json "summarize diff"Tools and Context 6
gptme -t read-only "summarize repo"gptme -t patch,save "fix typo" main.pygptme -t +subagent "plan refactor"gptme -t=-browser "summarize code"gptme --tools none "what is 2+2"gptme --context files "do task"Sessions and Tooling 8
gptme -rgptme --name mytaskgptme tools listgptme chats listgptme models listgptme context indexgptme chats search "query"gptme --helpTips
- -y auto-confirm and -n non-interactive with --output-format json is the standard way to put it in CI.
- -t with +tool or -tool adds or removes tools for fine-grained permission control, safer than all-on.
- gptme context index builds RAG so chats carry project file context.
FAQ
How is gptme different from Claude Code?
gptme is provider-agnostic and local-first with 100+ models and concurrent agents; Claude Code is Anthropic official and Claude-native. Both run shell and code.
Can it run on a headless server?
Yes. -n non-interactive mode targets SSH, tmux, headless, and CI, with machine-readable output.
Official References
Each command links to its official documentation below, so you can verify the latest usage and read deeper.
Maintained by LaoHand
Publicly updated on Sep 10, 2026, continuously proofread against official docs.
Contact Us
Wrong command or description? Send us corrections, business inquiries or product feedback by email.
Contact Us