---
url: /v6.2/en-us/cli-install.md
---
# HENGSHI CLI Installation & Upgrade

## Access path

HENGSHI CLI is now available through public download links for Linux, macOS, and Windows.

* Installer script (Linux / macOS): `https://download.hengshi.com/cli/install.sh`
* Installer script (Windows PowerShell): `https://download.hengshi.com/cli/install.ps1`
* GitHub Releases (manual downloads and release notes): `https://github.com/hengshi/cli/releases`

Initial installation and later upgrades reuse the same installer entry points above. If you need a fixed version package, use GitHub Releases instead of constructing a versioned `download.hengshi.com` URL.

> \[!NOTE]
> Starting with **2.0.0**, the public command name is `hbi`, and the preferred environment-variable prefix is `HBI_*`. To avoid confusion, this page does not document legacy naming/compatibility details; follow the behavior of your installed package and upgrade scripts if you still have older names in your environment.

## Recommended installation paths

### Option 1: Use the official installer script

Linux / macOS:

```bash
curl -fsSL https://download.hengshi.com/cli/install.sh | sh
```

Windows PowerShell:

```powershell
irm https://download.hengshi.com/cli/install.ps1 | iex
```

If you want to install the CLI and the official bundled skills in one step, pass the installer flags directly:

```bash
curl -fsSL https://download.hengshi.com/cli/install.sh | sh -s -- --with-skills
curl -fsSL https://download.hengshi.com/cli/install.sh | sh -s -- --with-skills --agent openclaw
curl -fsSL https://download.hengshi.com/cli/install.sh | sh -s -- --with-skills --agent claude-code --agent github-copilot
```

Windows PowerShell:

```powershell
& ([scriptblock]::Create((irm https://download.hengshi.com/cli/install.ps1))) -WithSkills -Agent openclaw
```

If `--agent` is omitted, the installer auto-detects existing local agent config directories from the bundled `supported-agents.tsv`. If `--agent` is provided, it installs directly into that agent's global skill directory.

### Option 2: Download release assets from GitHub Releases

If you need fixed-version rollout, offline delivery, or package mirroring, download the matching release assets from GitHub Releases:

```text
https://github.com/hengshi/cli/releases
```

Each release page provides:

* platform-specific binary archives
* `checksums.txt`
* release notes

## Verify the installation

At minimum, run:

```bash
hbi --version
hbi --help
hbi auth status
```

If `hbi --version` works and `auth status` only says that you are not logged in yet, the CLI itself is installed correctly. The usual next step is to pick the target host explicitly and authenticate:

```bash
export HBI_HOST="<your-hengshi-sense-instance>"
hbi auth login --device-login
```

For automation, prefer explicit `HBI_HOST` + `HBI_CLIENT_ID` + `HBI_CLIENT_SECRET`. Current CLI releases no longer depend on the OS keyring; if a runtime must not keep renewable credentials locally, use a one-off `HBI_TOKEN` / `--token`. See [Authentication & Connection](cli-auth.md) for the full host/auth decision table.

## Upgrade guidance

Upgrading does not require a separate "upgrade download" URL. If the current CLI install came from the official installer, prefer the built-in updater commands:

* **Check whether a newer public version exists**: `hbi update --check`
* **Upgrade to the latest public release**: `hbi update`
* **Upgrade the CLI and refresh bundled skills together**: `hbi update --with-skills`
* **Upgrade or switch to a specific public version**: `hbi update --version <version>`
* **Refresh official skills only**: `hbi update --version <current-version> --with-skills`

```bash
hbi update --check
hbi update
hbi update --with-skills
```

`hbi update --check` is auth-free; it does not require saved credentials, `HBI_TOKEN` / `--token`, or instance selection. If the command says the current install is not updater-managed yet, rerun the official installer once first.

If you already installed the CLI through the installer script, or you need to repair an environment that does not have local updater state yet, you can still rerun the same installer command:

```bash
curl -fsSL https://download.hengshi.com/cli/install.sh | sh
```

Windows PowerShell:

```powershell
irm https://download.hengshi.com/cli/install.ps1 | iex
```

If you need a specific version package, open `https://github.com/hengshi/cli/releases` and choose the matching release instead of manually constructing a versioned `download.hengshi.com` directory URL.

If you only want to refresh the official bundled skills through the installer path without changing the CLI binary, rerun the installer with `--with-skills`:

```bash
curl -fsSL https://download.hengshi.com/cli/install.sh | sh -s -- --with-skills
```

After upgrading, run:

```bash
hbi --version
hbi auth status --output json
```

If you run into inconsistent command entrypoints after upgrading, rerun the official installer to let it take over the installation, and standardize on `hbi` as the command entrypoint.
