Requires Python 3.12+ and uv installed.Install OpenHands:
Copy
Ask AI
uv tool install openhands
Run OpenHands:
Copy
Ask AI
openhands
Upgrade OpenHands:
Copy
Ask AI
uv tool upgrade openhands
Download the executable binary from
OpenHands release page and rename it to
openhands for simplicity.
Make it executable:
Copy
Ask AI
chmod +x ./openhands
Run the executable:
Copy
Ask AI
./openhands
Your system may require you to allow permissions to run the executable.
MacOS
We are working on a fix for this issue.When running the OpenHands CLI on Mac, you will get a warning that says “openhands can’t be opened because Apple
cannot check it for malicious software.”
Open System Settings.
Go to Privacy & Security.
Scroll down to Security and click Allow Anyway.
Rerun the OpenHands CLI.
Set the following environment variable in your terminal:
The -e SANDBOX_USER_ID=$(id -u) is passed to the Docker command to ensure the sandbox user matches the host user’s
permissions. This prevents the agent from creating root-owned files in the mounted workspace.
The first time you run the CLI, it will take you through configuring the required LLM settings. These will be saved
for future sessions.The conversation history will be saved in ~/.openhands/conversations.
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.
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: