gptme#
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.
Run ‘gptme-util –help’ for all utility commands.
Usage
gptme [OPTIONS] [PROMPTS]...
Options
- --name <name>#
Conversation ID (used to resume). Defaults to a random name.
- -m, --model <model>#
Model to use, e.g. {model_examples}. If only provider given then a default is used.
- --agent-path <agent_path>#
Path to agent workspace directory.
- -r, --resume#
Load the most recent conversation in this workspace. Use –name ID to select one.
- -y, --no-confirm#
Skip all confirmation prompts.
- --gear <gear>#
Autonomy preset: 0=observe, 1=review, 2=plan, 3=execute, 4=integrate. Explicit –tools/–agent-profile/–no-confirm override preset parts.
- -n, --non-interactive#
Non-interactive mode. Implies –no-confirm.
- --output-format <output_format>#
Output format for non-interactive mode. ‘json’ emits one JSON object per line on stdout.
- Options:
text | json
- --system <prompt_system>#
System prompt [full|full-noexamples|short|<custom>]. Defaults to ‘full’, or the value of system in gptme.toml [prompt] if set. ‘full-noexamples’ omits tool examples (~40% token reduction).
- -t, --tools <tool_allowlist>#
Tools to allow. Comma-separated or repeated. Use ‘+tool’ to add to defaults (e.g., ‘-t +subagent’). Use ‘-tool’ to exclude from defaults (e.g., ‘-t=-browser’). Use ‘none’ to disable all tools. Supports .py file paths for custom tools (e.g., ‘-t path/to/tool.py’). See ‘Available tools’ above for the list.
- --agent-profile <agent_profile>#
Agent profile to use. Profiles provide system prompts, tool access hints, and behavior rules. Use ‘gptme-util profile list’ to see available profiles.
- --tool-format <tool_format>#
Tool format to use.
- Options:
markdown | xml | tool
- --prune-tool-output, --no-prune-tool-output#
Use a summary model to keep only the relevant lines from large shell/read tool outputs.
- --stream, --no-stream#
Stream responses
Show hidden system messages.
- --show-prompt-stats#
Show startup system-prompt token stats for the current configuration and exit.
- -v, --verbose#
Show verbose output.
- --version#
Show version. With -v/–verbose, show full configuration info.
- --version-json#
Show version info as JSON (machine-readable, for scripting).
- --profile#
Enable profiling and save results to gptme-profile-{timestamp}.prof
- --context <context_include>#
Context to include (default: all). Comma-separated or repeated. Tools and agent config (–agent-path) are always included.
- --no-workspace#
Skip all workspace context (prompt files and context_cmd). Tools and agent config are still included.
- --architect#
Enable architect/editor split mode: plan with strong model, execute with cheap model.
- --architect-model <architect_model>#
Model to use for the architect (planning) turn. E.g. openai/o3, anthropic/claude-opus-4-7.
- --editor-model <editor_model>#
Model to use for the editor (execution) turn. E.g. anthropic/claude-sonnet-4-5, openai/gpt-5-mini.
- --auto-accept-architect#
Skip user confirmation between architect and editor turns.
- --injection-hygiene <injection_hygiene>#
Prompt injection hygiene for tool outputs: off (disabled), warn (flag suspicious content), block (redact HIGH-severity patterns). Overrides GPTME_INJECTION_HYGIENE env var.
- Options:
off | warn | block
- --manifest-dir <manifest_dir>#
Write a JSON record before and after each tool call to this directory. Records can be committed alongside session artifacts for tool-call-level attribution.
Arguments
- PROMPTS#
Optional argument(s)
Environment variables
- GPTME_INJECTION_HYGIENE
Provide a default for
--injection-hygiene
- GPTME_MANIFEST_DIR
Provide a default for
--manifest-dir