OpenHands CLI cheat sheet
Every command, flag and slash command for openhands — All Hands AI's terminal agent (formerly OpenDevin) — model-agnostic via LiteLLM, MCP + ACP. 12+ commands, verified July 2026.
The All-Hands-AI → OpenHands rebrand means docs.all-hands.dev now redirects to docs.openhands.dev. This is the V1 CLI (PyPI openhands), distinct from the Docker web GUI.
uv tool install openhands --python 3.12 # recommended (Python 3.12+)
curl -fsSL https://install.openhands.dev/install.sh | sh # standalone binary
pip install openhands
openhands # interactive TUI
openhands -t "Create a REST API" # seed with an inline task
openhands -f instructions.md # seed a task from a file
openhands --headless -t "Write tests" # non-interactive (CI)
openhands --resume [--last | <id>] # resume a conversation
Key flags
| Flag | What it does |
|---|---|
-t, --task "<text>" | Provide the task inline |
-f, --file <path> | Load the task/instructions from a file |
--headless | Run without the UI (CI); always-approve mode |
--json | Emit JSONL events (pairs with --headless) |
--resume [id] / --last | Resume a conversation / the most recent |
--always-approve (--yolo) | Auto-approve every agent action |
--override-with-envs | Apply LLM_* env vars for this run only |
In-session commands
| Command | What it does |
|---|---|
/help · /new | Help · start a new conversation |
/history · /condense | Browse history · summarize to save context |
/skills · /confirm | Manage skills · confirmation controls |
/feedback · /exit | Send feedback · exit |
Ctrl+P · Esc | Command palette (Settings/MCP/Theme) · pause the agent |
Other subcommands: openhands acp (ACP server for IDEs), openhands web, openhands serve (Docker GUI), openhands cloud -t "…", openhands mcp ….
~/.openhands/settings.json # LLM settings (from first-run setup)
~/.openhands/mcp.json # MCP servers (V1 CLI is JSON, not config.toml)
# env vars are ignored unless you pass --override-with-envs:
# LLM_API_KEY · LLM_MODEL (LiteLLM, e.g. anthropic/claude-sonnet-4-5) · LLM_BASE_URL
uv tool install openhands --python 3.12 && openhands
openhands --headless -t "Write unit tests for auth.py"
openhands --headless --json -t "Create a simple Flask app" > run.jsonl
LLM_API_KEY=sk-… LLM_MODEL=anthropic/claude-sonnet-4-5 \
openhands --override-with-envs --headless -t "Fix the failing CI"
More CLI cheat sheets
Stop memorizing flags
Run OpenHands CLI — and every other agent — from one app
TheVibeFather orchestrates OpenHands CLI alongside every other coding CLI in one native macOS app. Bring the models you already pay for; keep your keys.
Claude Code
Gemini CLI
Aider
Goose
Qwen Code
Crush
Grok CLI
Cline CLI
Roo Code CLI
Continue CLI