Overview
The OpenHands CLI provides multiple ways to interact with the OpenHands AI agent:| Mode | Command | Best For |
|---|---|---|
| Terminal (TUI) | openhands | Interactive development |
| Headless | openhands --headless | Scripts & automation |
| Web Interface | openhands web | Browser-based TUI |
| GUI Server | openhands serve | Full web GUI |
| IDE Integration | openhands acp | Zed, VS Code, JetBrains |
Your First Conversation
Set up your account (first time only):- OpenHands Cloud (recommended)
- Configure manually
-
Start the CLI:
-
Enter a task:
- Watch OpenHands work: The agent will create the file and show you the results.
Controls
Once inside the CLI, use these controls:| Control | Description |
|---|---|
Ctrl+P | Open command palette (access Settings, MCP status) |
Esc | Pause the running agent |
Ctrl+Q or /exit | Exit the CLI |
Starting with a Task
You can start the CLI with an initial task:Resuming Conversations
Resume a previous conversation:Next Steps
Terminal Mode
Learn about the interactive terminal interface
IDE Integration
Use OpenHands in Zed, VS Code, or JetBrains
Headless Mode
Automate tasks with scripting
MCP Servers
Add tools via Model Context Protocol

