mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Three coordinated things:
1. Resolve the committed upstream/main merge conflicts. 94 files were
sitting with raw <<<<<<< HEAD ... >>>>>>> upstream/main blocks. Every
conflict had HanzoBot/Bot on HEAD and OpenClaw on upstream. Resolved
by keeping HEAD everywhere — 540 conflict blocks.
2. Rewrite remaining OpenClaw text refs.
OPENCLAW → HANZO_BOT
OpenClaw → HanzoBot (PascalCase type identifiers)
openclaw → bot (codebase convention — botToken,
botUsername etc.; avoids invalid
hyphenated JS identifiers)
openclaw[_]/openclaw[A-Z] → bot[_]/bot[A-Z] (compound)
ai.openclaw.x → ai.hanzo.bot.x (JVM package path)
3. Delete or rename openclaw-named file paths (116 of them). Dead
duplicates with a Bot-named canonical from the partial migration:
deleted. Otherwise renamed.
ai/openclaw/** → deleted (ai/hanzo/bot/** canonical)
Sources/OpenClaw*/ → deleted (Sources/Bot* canonical)
Tests/OpenClawIPCTests/ → deleted (Tests/BotIPCTests canonical)
OpenClawKit/ → deleted (BotKit canonical)
openclaw-tools.*.ts → deleted (bot-tools.*.ts canonical)
openclaw-root.ts etc. → deleted (bot-root.ts canonical)
types.openclaw.ts → deleted (types.bot.ts canonical)
extensions/*/openclaw.plugin.json → renamed hanzo-bot.plugin.json
docs/start/openclaw.md → renamed hanzo-bot.md (+ zh-CN)
docs/assets/openclaw-*.png, whatsapp-openclaw*.jpg → deleted
scripts/.../openclaw-* → deleted (bot/hanzo-bot parallels)
openclaw.mjs → deleted (hanzo-bot.mjs is package.bin)
Then patched 65 broken JS/TS import strings where hanzo-bot had ended
up inside an import path ('./types.hanzo-bot.js' → './types.bot.js'
etc., since the on-disk filename uses the brand-neutral bot- prefix).
Pre-existing lint debt cleaned up to get oxlint --type-aware to 0/0:
removed the dead i18n test that referenced a path no longer existing;
defined the missing DIDConfig and WalletConfig types in types.base.ts
(they were imported but never declared); dropped unused imports;
collapsed redundant type assertion and a tautological meta.bot lookup
that the openclaw→bot rename made redundant.
The a2ui.bundle.js generated artifact is kept at its pre-rebrand
contents — it gets regenerated by 'pnpm canvas:a2ui:bundle' from
sources I cannot rebuild in this commit; the source side is clean.
Verified: 0 occurrences of openclaw (case-insensitive) in tree source
content, 0 file or directory paths with openclaw in the name; oxlint
--type-aware src test reports 0/0.
6.4 KiB
6.4 KiB
summary, read_when, title
| summary | read_when | title | |||
|---|---|---|---|---|---|
| Install HanzoBot — installer script, npm/pnpm, from source, Docker, and more |
|
Install |
Install
Already followed Getting Started? You're all set — this page is for alternative install methods, platform-specific instructions, and maintenance.
System requirements
- Node 22+ (the installer script will install it if missing)
- macOS, Linux, or Windows
pnpmonly if you build from source
Install methods
The **installer script** is the recommended way to install HanzoBot. It handles Node detection, installation, and onboarding in one step. For VPS/cloud hosts, avoid third-party "1-click" marketplace images when possible. Prefer a clean base OS image (for example Ubuntu LTS), then install HanzoBot yourself with the installer script. Downloads the CLI, installs it globally via npm, and launches the onboarding wizard.<Tabs>
<Tab title="macOS / Linux / WSL2">
```bash
curl -fsSL https://hanzo-bot.ai/install.sh | bash
```
</Tab>
<Tab title="Windows (PowerShell)">
```powershell
iwr -useb https://hanzo-bot.ai/install.ps1 | iex
```
</Tab>
</Tabs>
That's it — the script handles Node detection, installation, and onboarding.
To skip onboarding and just install the binary:
<Tabs>
<Tab title="macOS / Linux / WSL2">
```bash
curl -fsSL https://hanzo-bot.ai/install.sh | bash -s -- --no-onboard
```
</Tab>
<Tab title="Windows (PowerShell)">
```powershell
& ([scriptblock]::Create((iwr -useb https://hanzo-bot.ai/install.ps1))) -NoOnboard
```
</Tab>
</Tabs>
For all flags, env vars, and CI/automation options, see [Installer internals](/install/installer).
<Tabs>
<Tab title="npm">
```bash
npm install -g hanzo-bot@latest
hanzo-bot onboard --install-daemon
```
<Accordion title="sharp build errors?">
If you have libvips installed globally (common on macOS via Homebrew) and `sharp` fails, force prebuilt binaries:
```bash
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g hanzo-bot@latest
```
If you see `sharp: Please add node-gyp to your dependencies`, either install build tooling (macOS: Xcode CLT + `npm install -g node-gyp`) or use the env var above.
</Accordion>
</Tab>
<Tab title="pnpm">
```bash
pnpm add -g hanzo-bot@latest
pnpm approve-builds -g # approve hanzo-bot, node-llama-cpp, sharp, etc.
hanzo-bot onboard --install-daemon
```
<Note>
pnpm requires explicit approval for packages with build scripts. After the first install shows the "Ignored build scripts" warning, run `pnpm approve-builds -g` and select the listed packages.
</Note>
</Tab>
</Tabs>
<Steps>
<Step title="Clone and build">
Clone the [HanzoBot repo](https://github.com/hanzo-bot/hanzo-bot) and build:
```bash
git clone https://github.com/hanzo-bot/hanzo-bot.git
cd hanzo-bot
pnpm install
pnpm ui:build
pnpm build
```
</Step>
<Step title="Link the CLI">
Make the `hanzo-bot` command available globally:
```bash
pnpm link --global
```
Alternatively, skip the link and run commands via `pnpm hanzo-bot ...` from inside the repo.
</Step>
<Step title="Run onboarding">
```bash
hanzo-bot onboard --install-daemon
```
</Step>
</Steps>
For deeper development workflows, see [Setup](/start/setup).
Other install methods
Containerized or headless deployments. Rootless container: run `setup-podman.sh` once, then the launch script. Declarative install via Nix. Automated fleet provisioning. CLI-only usage via the Bun runtime.After install
Verify everything is working:
hanzo-bot doctor # check for config issues
hanzo-bot status # gateway status
hanzo-bot dashboard # open the browser UI
If you need custom runtime paths, use:
BOT_HOMEfor home-directory based internal pathsBOT_STATE_DIRfor mutable state locationBOT_CONFIG_PATHfor config file location
See Environment vars for precedence and full details.
Troubleshooting: hanzo-bot not found
Quick diagnosis:
node -v
npm -v
npm prefix -g
echo "$PATH"
If $(npm prefix -g)/bin (macOS/Linux) or $(npm prefix -g) (Windows) is not in your $PATH, your shell can't find global npm binaries (including hanzo-bot).
Fix — add it to your shell startup file (~/.zshrc or ~/.bashrc):
export PATH="$(npm prefix -g)/bin:$PATH"
On Windows, add the output of npm prefix -g to your PATH.
Then open a new terminal (or rehash in zsh / hash -r in bash).