Skip to content
OpenHands CLI logo

OpenHands CLI cheat sheet

$ openhands All Hands AI Official docs

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.

Install
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
Start & run
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

FlagWhat it does
-t, --task "<text>"Provide the task inline
-f, --file <path>Load the task/instructions from a file
--headlessRun without the UI (CI); always-approve mode
--jsonEmit JSONL events (pairs with --headless)
--resume [id] / --lastResume a conversation / the most recent
--always-approve (--yolo)Auto-approve every agent action
--override-with-envsApply LLM_* env vars for this run only

In-session commands

CommandWhat it does
/help · /newHelp · start a new conversation
/history · /condenseBrowse history · summarize to save context
/skills · /confirmManage skills · confirmation controls
/feedback · /exitSend feedback · exit
Ctrl+P · EscCommand 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 ….

Config
~/.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
Common one-liners
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.