Overview
This mode is different from the headless mode, which is non-interactive and better for scripting.If you’re upgrading from a CLI version before release 1.0.0, you’ll need to redo your settings setup as the
configuration format has changed.
Getting Started
- Using uv (recommended)
- Executable Binary
- Using Docker
Requires Python 3.12+ and uv installed.Install OpenHands:Run OpenHands:Upgrade OpenHands:
~/.openhands/conversations.
Interactive CLI Overview
What is CLI Mode?
CLI mode enables real-time interaction with OpenHands through the terminal. You can type natural language tasks, use interactive commands, and receive instant feedback—all inside your terminal.CLI Options and Arguments
The OpenHands CLI supports various command-line options to customize your experience:Basic Options
--versionor-v: Display the CLI version--task "your task": Start the CLI with an initial task message--file path/to/file: Start the CLI with a specific file context--headless: Run in headless mode with auto-exit functionality--exit-without-confirmation: Exit without confirmation prompts
Experimental UI
The experimental UI is available starting from CLI version 1.5.0 and provides an enhanced terminal experience.
--exp flag:
- Enhanced Visual Experience: Consistent dark mode CLI UI that overrides light-themed terminals
- Loading Indicators: Spinner animations for long-running commands
- Smart Queuing: Queue prompts while the agent is running to avoid interruptions
- File Search: Use the
@macro to search and reference files in your project - Collapsible Messages: Reduced verbosity with optionally collapsible CLI messages
- Multi-line Support: Improved multi-line input handling with automatic paste detection
Approval and Confirmation Modes
Control how the CLI handles agent actions:--always-approve: Automatically approve all agent actions without prompting--llm-approve: Use the LLM to automatically approve actions based on context
Skills and Capabilities
The CLI automatically loads and provides access to:- Project Skills: Custom skills defined in your project’s
.openhands/skills/directory - User Skills: Personal skills from
~/.openhands/skills/ - Public Skills: Community-contributed skills from the OpenHands skills repository
- Legacy Microagents: Backward compatibility with existing microagent configurations
Version Management
The CLI includes automatic version checking and will prompt you when updates are available. You can check your current version with:CLI Commands and Settings
The OpenHands CLI provides various commands for managing settings, conversations, and configurations. For detailed information about available commands, configuration options, and troubleshooting, see the CLI Settings page. Key features include:- Interactive settings configuration with
/settings - MCP server management with
/mcp - Conversation management with
/newand/help - Memory management with
/condense - Real-time status monitoring and control


