Skip to main content
Windows Users: The OpenHands CLI requires WSL (Windows Subsystem for Linux). Native Windows is not officially supported. Please install WSL and run all CLI commands inside your WSL terminal. See Installation for details.

Overview

The OpenHands CLI provides multiple ways to interact with the OpenHands AI agent:
ModeCommandBest For
Terminal (CLI)openhandsInteractive development
Headlessopenhands --headlessScripts & automation
Web Interfaceopenhands webBrowser-based terminal UI
GUI Serveropenhands serveFull web GUI
IDE Integrationopenhands acpZed, VS Code, JetBrains

Your First Conversation

Set up your account (first time only):
  1. Start the CLI:
    openhands
    
  2. Enter a task:
    Create a Python script that prints "Hello, World!"
    
  3. Watch OpenHands work: The agent will create the file and show you the results.

Controls

Once inside the CLI, use these controls:
ControlDescription
Ctrl+POpen command palette (access Settings, MCP status)
EscPause the running agent
Ctrl+Q or /exitExit the CLI

Starting with a Task

You can start the CLI with an initial task:
# Start with a task
openhands -t "Fix the bug in auth.py"

# Start with a task from a file
openhands -f task.txt

Resuming Conversations

Resume a previous conversation:
# List recent conversations and select one
openhands --resume

# Resume the most recent conversation
openhands --resume --last

# Resume a specific conversation by ID
openhands --resume abc123def456
For more details, see Resume Conversations.

Next Steps