Skip to content

Commit 47d2d6b

Browse files
docs(cli): add CLI reference and workshop-mode guide
Adds two new pages documenting the recently-shipped `clawhalla` CLI and the remote-tunnel workshop flow it enables: - `/cli/` — full command reference for `connect`, `disconnect`, `status` and the `mc install/start/stop/status/logs/open` subcommands. Covers every flag (including `--no-bridge` for bare-OpenClaw VPSs and `--bind 0.0.0.0` with the security caveat) and lists what the CLI writes to `~/.clawhalla/`. - `/guides/workshop-mode/` — end-to-end walkthrough for the ipe.city-style setup where the VPS is already running OpenClaw and you just want to drive it from your laptop. Walks through install → start → tunnel → onboard → squad creation → teardown, plus a table of the five connectivity-banner states and what to do for each. Updates the docs landing page to present the two paths (local Docker launcher vs remote tunnel + local MC) as equal-weight first-class options instead of burying the CLI path, and wires both new pages into the Starlight sidebar. Build verified locally (17 pages, was 15; pagefind index updated).
1 parent e6a4840 commit 47d2d6b

4 files changed

Lines changed: 263 additions & 14 deletions

File tree

astro.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,17 @@ export default defineConfig({
2727
{ label: 'Server Setup', link: '/getting-started/server-setup/' },
2828
],
2929
},
30+
{
31+
label: 'CLI',
32+
items: [
33+
{ label: 'Overview', link: '/cli/' },
34+
],
35+
},
3036
{
3137
label: 'Guides',
3238
items: [
3339
{ label: 'Your First Agent', link: '/guides/first-agent/' },
40+
{ label: 'Workshop mode (remote tunnel)', link: '/guides/workshop-mode/' },
3441
{ label: 'Customization', link: '/guides/customization/' },
3542
{ label: 'Content Pipeline', link: '/guides/content-pipeline/' },
3643
{ label: 'Autopilot', link: '/guides/autopilot/' },

src/content/docs/cli/index.mdx

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
title: ClawHalla CLI
3+
description: The clawhalla CLI — SSH tunnel to a remote OpenClaw gateway and run Mission Control locally.
4+
---
5+
6+
import { Card, CardGrid } from '@astrojs/starlight/components';
7+
8+
The `clawhalla` CLI gives you two things on one command:
9+
10+
1. **`clawhalla connect`** — opens an SSH tunnel from your laptop to a remote VPS running OpenClaw, so Mission Control can talk to a gateway you do not have to install locally.
11+
2. **`clawhalla mc`** — installs and runs Mission Control in the background, without touching a `cd apps/mission-control && pnpm install && pnpm dev` dance.
12+
13+
This is the path most workshop users want. If you would rather run the whole OpenClaw stack locally in Docker, see [Installation](/getting-started/installation/).
14+
15+
## Install
16+
17+
The CLI currently ships from the monorepo. Clone the repo and link the `clawhalla` binary on your PATH:
18+
19+
```bash
20+
git clone https://github.com/deegalabs/clawhalla.git
21+
cd clawhalla/apps/cli
22+
pnpm install && pnpm build
23+
ln -s "$(pwd)/bin/clawhalla.js" ~/.local/bin/clawhalla
24+
clawhalla --version
25+
```
26+
27+
Make sure `~/.local/bin` is on your `PATH`.
28+
29+
## Command reference
30+
31+
### `clawhalla connect <target>`
32+
33+
Opens an SSH tunnel to a remote OpenClaw gateway and publishes it on a local port so Mission Control can talk to it.
34+
35+
```bash
36+
clawhalla connect root@vps.example.com:22022 \
37+
--alias my-box \
38+
--remote-gateway-port 47716 \
39+
--no-bridge
40+
```
41+
42+
| Flag | Purpose |
43+
| --- | --- |
44+
| `--alias <name>` | Local alias for the tunnel. Defaults to the first DNS label of the host. |
45+
| `--identity <path>` | SSH private key to use. Defaults to the ClawHalla-managed key in `~/.clawhalla/keys/id_ed25519`, auto-generated on first run. |
46+
| `--remote-gateway-port <port>` | Remote OpenClaw HTTP gateway port. Default `18789`. Workshop VPSs often publish it on a different port (e.g. `47716`). |
47+
| `--remote-bridge-port <port>` | Remote OpenClaw WS bridge port. Default `18790`. |
48+
| `--no-bridge` | Skip the WS bridge forward entirely. Use this for bare-OpenClaw VPSs that only publish the HTTP gateway port. |
49+
| `--bind <host>` | Local interface to bind the forwarded ports on. Default `127.0.0.1`. Use `0.0.0.0` if Mission Control runs inside a Docker container on Linux. |
50+
| `--skip-probe` | Skip the BatchMode SSH probe. Useful for password-only targets. |
51+
| `--no-auto-key` | Do not auto-generate or install a ClawHalla-managed SSH key. |
52+
53+
### `clawhalla disconnect [alias]`
54+
55+
Closes an active tunnel. Pass an alias, or `--all` to close every tunnel at once.
56+
57+
```bash
58+
clawhalla disconnect my-box
59+
clawhalla disconnect --all
60+
```
61+
62+
### `clawhalla status`
63+
64+
Lists every active tunnel with its local ports and the remote target.
65+
66+
```bash
67+
clawhalla status
68+
```
69+
70+
### `clawhalla mc <subcommand>`
71+
72+
Installs and runs Mission Control without leaving the CLI.
73+
74+
| Subcommand | What it does |
75+
| --- | --- |
76+
| `mc install` | Checks `git`/`pnpm`, clones the clawhalla repo into `~/.clawhalla/source` (or reuses the current checkout if you're inside the monorepo), runs `pnpm install`, creates `~/.openclaw/workspace` and `apps/mission-control/data`. |
77+
| `mc start [--port 3000]` | Spawns `pnpm dev` detached so it survives the CLI exit. Writes the pid to `~/.clawhalla/mc.pid` and polls the HTTP root until it responds. Prints the URL + PID + log path. |
78+
| `mc stop` | Sends `SIGTERM` to the Mission Control process group, falls back to `SIGKILL` after a grace period, clears the pidfile. |
79+
| `mc status [--port 3000]` | Reports whether the pid is alive and whether HTTP is responding. |
80+
| `mc logs [-f]` | Dumps the last 16 KB of the log. With `-f`, shells out to `tail -f` (Linux/macOS). On Windows, prints a `Get-Content -Wait` hint. |
81+
| `mc open [--port 3000]` | Opens Mission Control in your default browser (cross-platform: `xdg-open` / `open` / `start`). |
82+
83+
## Typical flow
84+
85+
```bash
86+
# 1. Install MC once
87+
clawhalla mc install
88+
89+
# 2. Start it in the background
90+
clawhalla mc start
91+
92+
# 3. Open an SSH tunnel to a remote OpenClaw gateway
93+
clawhalla connect root@vps.example.com:22022 --remote-gateway-port 47716 --no-bridge
94+
95+
# 4. Open the browser
96+
clawhalla mc open
97+
```
98+
99+
When you finish:
100+
101+
```bash
102+
clawhalla disconnect --all
103+
clawhalla mc stop
104+
```
105+
106+
## State on disk
107+
108+
Everything the CLI writes lives under `~/.clawhalla/`:
109+
110+
- `tunnels.json` — registry of active tunnels (read by Mission Control's connectivity banner)
111+
- `keys/id_ed25519` — managed SSH key used for `clawhalla connect`
112+
- `source/` — managed clone of the clawhalla monorepo (only if you did not run from a checkout)
113+
- `mc.pid`, `mc.log` — Mission Control process state and output
114+
115+
Nothing writes outside that directory. Deleting `~/.clawhalla/` fully resets the CLI.
116+
117+
## Next steps
118+
119+
<CardGrid>
120+
<Card title="Workshop mode" icon="rocket">
121+
[End-to-end walkthrough](/guides/workshop-mode/) against a remote VPS.
122+
</Card>
123+
<Card title="Configuration" icon="setting">
124+
[Environment variables](/reference/environment/) and `openclaw.json`.
125+
</Card>
126+
</CardGrid>
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: Workshop mode (remote tunnel)
3+
description: Run Mission Control on your laptop against a remote OpenClaw gateway over an SSH tunnel.
4+
---
5+
6+
Workshop mode is for the case where OpenClaw is already running on a remote VPS (typical of ipe.city-style buildathon boxes) and you only want to drive it from your laptop. No local Docker, no local OpenClaw install — just an SSH tunnel and Mission Control.
7+
8+
## Prerequisites
9+
10+
- `git`, `pnpm`, and `node` 20+ on your machine
11+
- SSH access to a VPS that is running OpenClaw and publishing the HTTP gateway on some port (default `18789`, but workshop boxes often use a mapped port like `47716`)
12+
- The `clawhalla` CLI on your `PATH` (see [ClawHalla CLI — Install](/cli/))
13+
14+
## Step 1 — Install Mission Control locally
15+
16+
```bash
17+
clawhalla mc install
18+
```
19+
20+
This clones the clawhalla repo into `~/.clawhalla/source` (or reuses the current checkout if you are already inside the monorepo), runs `pnpm install`, and creates the Mission Control data directory. Run this once per machine.
21+
22+
## Step 2 — Start Mission Control
23+
24+
```bash
25+
clawhalla mc start
26+
```
27+
28+
Mission Control is spawned detached, so the dev server keeps running after the CLI exits. The command prints the URL, the pid, and the log file path, then returns. If you tail the log:
29+
30+
```bash
31+
clawhalla mc logs -f
32+
```
33+
34+
## Step 3 — Open an SSH tunnel to the remote gateway
35+
36+
```bash
37+
clawhalla connect root@vps.example.com:22022 \
38+
--alias workshop \
39+
--remote-gateway-port 47716 \
40+
--no-bridge
41+
```
42+
43+
Breakdown of the flags:
44+
45+
- `root@vps.example.com:22022` — the VPS SSH target (user, host, optional port)
46+
- `--alias workshop` — a friendly name for this tunnel, used by `disconnect` / `status`
47+
- `--remote-gateway-port 47716` — the port OpenClaw is published on inside the VPS. If you omit this, the CLI assumes `18789` (the OpenClaw default)
48+
- `--no-bridge` — skip the secondary WS bridge forward. Bare-OpenClaw VPSs only publish the HTTP gateway, not the bridge; the flag makes the CLI tolerate that
49+
50+
The first time you run this, the CLI will generate an `ed25519` keypair under `~/.clawhalla/keys/` and try to install the public half on the VPS via `ssh-copy-id`. On subsequent runs it reuses the same key and connects without prompting.
51+
52+
:::caution[`--bind 0.0.0.0`]
53+
If you run Mission Control inside a Docker container on Linux and it is trying to reach the tunnel from outside the host network namespace, pass `--bind 0.0.0.0`. The CLI prints a security warning when you do this — the tunnel becomes reachable from anywhere on your LAN, so only use it on trusted networks.
54+
:::
55+
56+
## Step 4 — Open Mission Control
57+
58+
```bash
59+
clawhalla mc open
60+
```
61+
62+
At the top of the onboarding wizard you should see a green banner:
63+
64+
> ● Connected via ClawHalla tunnel
65+
> workshop → vps.example.com · local :18789 → remote :47716
66+
67+
If the banner is red or amber, the [Connectivity states](#connectivity-states) section below tells you what to do.
68+
69+
## Step 5 — Drive onboarding
70+
71+
Fill in the wizard. The gateway URL should already be `http://127.0.0.1:18789` (or whatever local port the CLI allocated — Mission Control detects this automatically). You will need to provide:
72+
73+
- The gateway token (you can fetch it from the VPS: `docker exec <container> cat /home/node/.openclaw/openclaw.json` and look for `gateway.auth.token`)
74+
- An Anthropic or Google API key (or pick Ollama / skip)
75+
- The squad you want to create — `hackathon` ships with six agents (Thor, Odin, Freya, Tyr, Heimdall, Bragi) and nine skills per agent out of the box
76+
77+
After you finish onboarding, Mission Control generates IDENTITY.md / SOUL.md / skills under `~/.openclaw/workspace/squads/<squad>/<agent>/` for every agent on the team.
78+
79+
## Step 6 — Tear down
80+
81+
```bash
82+
clawhalla disconnect --all
83+
clawhalla mc stop
84+
```
85+
86+
Both are idempotent — running them when there is nothing to tear down is a no-op.
87+
88+
## Connectivity states
89+
90+
Mission Control polls `/api/connection/probe` every four seconds and renders one of these banners:
91+
92+
| Banner | What it means | Fix |
93+
| --- | --- | --- |
94+
| **● Connected via ClawHalla tunnel** (green) | Tunnel is up and the remote gateway is answering HTTP | Nothing. Proceed with onboarding. |
95+
| **▲ Tunnel up, remote gateway not responding** (amber) | SSH tunnel is alive but OpenClaw on the VPS is not answering | Check OpenClaw is running on the VPS: `ssh <vps> "docker ps"` |
96+
| **■ ClawHalla tunnel has exited** (red) | `~/.clawhalla/tunnels.json` has entries but the SSH pid is gone — usually after a reboot | `clawhalla connect ...` again |
97+
| **▲ Local OpenClaw config detected** (amber) | No tunnel, but `~/.openclaw/openclaw.json` exists from a local install | Start local OpenClaw, or run `clawhalla connect` |
98+
| **■ No OpenClaw connection detected** (red) | Nothing found anywhere | `clawhalla connect <vps>` or install OpenClaw locally |
99+
100+
The banner auto-refreshes, so you can bring a tunnel up in a second terminal and watch the state flip to green without reloading the page.

src/content/docs/index.mdx

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,48 @@ description: Your AI agent's hall of glory. Running in one command.
55

66
import { Card, CardGrid } from '@astrojs/starlight/components';
77

8-
ClawHalla is an opinionated distribution of [OpenClaw](https://openclaw.ai) that removes all setup friction. One command gets you a running AI agent system with Mission Control, pre-trained agents, and a management dashboard.
8+
ClawHalla is the fastest way to run [OpenClaw](https://openclaw.ai). Two paths, same destination.
99

10-
## Why ClawHalla?
10+
## Pick your path
1111

12-
OpenClaw is a powerful AI agent framework, but setting it up requires navigating auth profiles, model configuration, and multiple CLI commands. ClawHalla wraps all of this in a guided installer with a web dashboard.
12+
<CardGrid>
13+
<Card title="Local Docker launcher" icon="rocket">
14+
Run the whole OpenClaw stack on your machine in Docker. Best when you want a self-contained environment and you're happy to pull the full image locally.
1315

14-
**One command. Everything configured. Agents ready.**
16+
```bash
17+
curl -fsSL https://clawhalla.xyz/install.sh | bash
18+
```
1519

16-
## Quick Start
20+
[Full installation →](/getting-started/installation/)
21+
</Card>
22+
<Card title="Remote tunnel + local MC" icon="seti:config">
23+
Keep the OpenClaw gateway on a remote VPS and run Mission Control on your laptop over an SSH tunnel. Best for workshops and buildathons where someone else already set up the VPS.
1724

18-
```bash
19-
curl -fsSL https://clawhalla.xyz/install.sh | bash
20-
```
25+
```bash
26+
clawhalla mc install && clawhalla mc start
27+
clawhalla connect root@vps.example.com:22022 --no-bridge
28+
```
2129

22-
The installer will ask for:
23-
- A workspace name
24-
- Install mode (Docker or bare metal)
25-
- Which services to include (Mission Control, Ollama)
30+
[Workshop mode guide →](/guides/workshop-mode/)
31+
</Card>
32+
</CardGrid>
2633

27-
Then open Mission Control at `http://localhost:3000` to connect your AI provider and start using agents.
34+
## Why ClawHalla?
35+
36+
OpenClaw is a powerful AI agent framework, but setting it up by hand requires Node, pnpm, multiple CLI commands, and understanding the ecosystem. ClawHalla gives you:
37+
38+
- A pre-configured Docker container for the all-in-one local path
39+
- A `clawhalla` CLI with `connect` (SSH tunnels) and `mc` (install/start/stop Mission Control) for the remote path
40+
- Mission Control — a browser UI for onboarding, squads, agents, and skills
2841

2942
## Next Steps
3043

3144
<CardGrid>
3245
<Card title="Installation" icon="rocket">
33-
[Full installation guide with Docker and bare metal options](/getting-started/installation/)
46+
[Detailed installation guide](/getting-started/installation/) for the local Docker path
47+
</Card>
48+
<Card title="ClawHalla CLI" icon="seti:powershell">
49+
[Command reference](/cli/) for `connect`, `disconnect`, `status`, and `mc`
3450
</Card>
3551
<Card title="Configuration" icon="setting">
3652
[Configure providers, models, and channels](/getting-started/configuration/)

0 commit comments

Comments
 (0)