gptme CLI Cheatsheet - Terminal AI Agent Full Reference

gptme is a personal AI agent that runs in any terminal with built-in shell, Python, web, and vision tools, provider-agnostic and local-first. It reads files, runs commands, and runs concurrent agents. This sheet covers chat, tools, context, and subcommands so you can wire it into CI or long-running scripts.

AI CLI·20 commands·Last updated 2026-09-10
gptmeaiagentclishellautomationlocal-first

Basic Chat 6

gptme "hello"
Start a chat with a prompt
gptme "fix TODOs" main.py
Start with file context
gptme -m anthropic/claude-sonnet-4-20250514
Select a model
gptme -y "run tests and fix"
Auto-confirm tool runs
gptme -n "summarize git diff"
Non-interactive mode (for CI)
gptme --output-format json "summarize diff"
JSON output for parsing

Tools and Context 6

gptme -t read-only "summarize repo"
Read-only tools, no writes
gptme -t patch,save "fix typo" main.py
Allow only named tools
gptme -t +subagent "plan refactor"
Add subagent to defaults
gptme -t=-browser "summarize code"
Remove browser from defaults
gptme --tools none "what is 2+2"
Disable all tools, chat only
gptme --context files "do task"
Skip context cmd, keep project files

Sessions and Tooling 8

gptme -r
Resume the latest session
gptme --name mytask
Name the session
gptme tools list
List available tools
gptme chats list
List past conversations
gptme models list
List available models
gptme context index
Index project files for RAG
gptme chats search "query"
Search past conversations
gptme --help
All flags

Tips

  • -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