From 3ebe3c2140f944ce86d1f8c5a46ff93243aaf176 Mon Sep 17 00:00:00 2001 From: Graham Neubig Date: Mon, 9 Jun 2025 08:13:09 -0400 Subject: [PATCH] Update CLI mode documentation to recommend pip install (#8967) Co-authored-by: openhands Co-authored-by: Engel Nyst --- docs/usage/how-to/cli-mode.mdx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/usage/how-to/cli-mode.mdx b/docs/usage/how-to/cli-mode.mdx index f70e4fce22..ba14e96362 100644 --- a/docs/usage/how-to/cli-mode.mdx +++ b/docs/usage/how-to/cli-mode.mdx @@ -9,16 +9,29 @@ This mode is different from the [headless mode](./headless-mode), which is non-i ### Running with Python -1. Ensure you have followed the [Development setup instructions](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md). +1. Install OpenHands using pip: + +```bash +pip install openhands-ai +``` + 2. Set your model, API key, and other preferences using environment variables or with the [`config.toml`](https://github.com/All-Hands-AI/OpenHands/blob/main/config.template.toml) file. 3. Launch an interactive OpenHands conversation from the command line: ```bash -poetry run python -m openhands.cli.main +openhands ``` This command opens an interactive prompt where you can type tasks or commands and get responses from OpenHands. +#### For Developers + +If you have cloned the repository, you can run the CLI directly using Poetry: + +```bash +poetry run python -m openhands.cli.main +``` + ### Running with Docker 1. Set the following environment variables in your terminal: