Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions openhands/usage/run-openhands/cli-mode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,20 @@ configuration format has changed.
<Tab title="Using uv (recommended)">
Requires Python 3.12+ and uv installed.

**Install OpenHands:**
```bash
uvx --python 3.12 openhands
uv tool install openhands
```

<Accordion title="Create shell aliases for easy access across environments">

Add the following to your shell configuration file (`.bashrc`, `.zshrc`, etc.):

**Run OpenHands:**
```bash
alias openhands="uvx --python 3.12 openhands"
alias oh="uvx --python 3.12 openhands"
openhands
```

After adding these lines, reload your shell configuration with `source ~/.bashrc` or `source ~/.zshrc` (depending on your shell).

</Accordion>
**Upgrade OpenHands:**
```bash
uv tool upgrade openhands
```
</Tab>
<Tab title="Executable Binary">
1. Download the executable binary from
Expand Down Expand Up @@ -99,7 +97,7 @@ configuration format has changed.
--add-host host.docker.internal:host-gateway \
--name openhands-cli-$(date +%Y%m%d%H%M%S) \
python:3.12-slim \
bash -c "pip install uv && uvx --python 3.12 openhands"
bash -c "pip install uv && uv tool install openhands && openhands"
```

The `-e SANDBOX_USER_ID=$(id -u)` is passed to the Docker command to ensure the sandbox user matches the host user’s
Expand Down
2 changes: 1 addition & 1 deletion openhands/usage/run-openhands/gui-mode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ You can launch the OpenHands GUI server directly from the command line using the

<Info>
**Prerequisites**: You need to have the [OpenHands CLI installed](/usage/run-openhands/cli-mode) first, OR have `uv`
installed and run `uvx --python 3.12 openhands serve`. Otherwise, you'll need to use Docker
installed and run `uv tool install openhands` and `openhands server`. Otherwise, you'll need to use Docker
directly (see the [Docker section](#using-docker-directly) below).
</Info>

Expand Down
16 changes: 13 additions & 3 deletions openhands/usage/run-openhands/local-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,30 @@ We recommend using [uv](https://docs.astral.sh/uv/) for the best OpenHands exper

See the [uv installation guide](https://docs.astral.sh/uv/getting-started/installation/) for the latest installation instructions for your platform.

**Install OpenHands**:
```bash
uv tool install openhands
```

**Launch OpenHands**:
```bash
# Launch the GUI server
uvx --python 3.12 openhands serve
openhands serve

# Or with GPU support (requires nvidia-docker)
uvx --python 3.12 openhands serve --gpu
openhands serve --gpu

# Or with current directory mounted
uvx --python 3.12 openhands serve --mount-cwd
openhands serve --mount-cwd
```

This will automatically handle Docker requirements checking, image pulling, and launching the GUI server. The `--gpu` flag enables GPU support via nvidia-docker, and `--mount-cwd` mounts your current directory into the container.

**Upgrade OpenHands**:
```bash
uv tool upgrade openhands
```

<Accordion title="Alternative: Traditional pip installation">

If you prefer to use pip and have Python 3.12+ installed:
Expand Down
16 changes: 14 additions & 2 deletions openhands/usage/windows-without-wsl.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,22 @@ After installation, restart your PowerShell session to ensure the environment va

### 3. Install and Run OpenHands

After installing the prerequisites, you can install and run OpenHands with:
After installing the prerequisites, install OpenHands with:

```powershell
uvx --python 3.12 openhands
uv tool install openhands
```

Then run OpenHands:

```powershell
openhands
```

To upgrade OpenHands in the future:

```powershell
uv tool upgrade openhands
```

### Troubleshooting CLI Issues
Expand Down