Skip to content

Commit 6f7a5f8

Browse files
committed
Add Windows PowerShell installation script
- Add install/hiclaw-install.ps1 for Windows installation support - PowerShell 7+ required - Supports Quick Start and Manual modes - Windows timezone detection with IANA conversion - LAN IP detection for mobile access instructions - Docker Desktop integration via named pipe - Update install/README.md with cross-platform installation guide - Update .github/workflows/release.yml with Windows quick start commands - Update README.md and README.zh-CN.md with Windows installation instructions Change-Id: I1229a94f32808959a00f6a01a336dc7ad3b3a65a Co-developed-by: Claude <noreply@anthropic.com>
1 parent cd0ad7f commit 6f7a5f8

5 files changed

Lines changed: 1551 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,28 @@ jobs:
3838
3939
## Quick Start
4040
41+
### macOS / Linux
42+
4143
```bash
4244
bash <(curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/main/install/hiclaw-install.sh)
4345
```
46+
47+
### Windows (PowerShell 7+)
48+
49+
```powershell
50+
Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/${{ github.repository }}/main/install/hiclaw-install.ps1" -UseBasicParsing).Content
51+
```
52+
53+
Or download and run:
54+
55+
```powershell
56+
# Download
57+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/${{ github.repository }}/main/install/hiclaw-install.ps1" -OutFile "hiclaw-install.ps1"
58+
59+
# Run
60+
.\hiclaw-install.ps1
61+
```
62+
63+
## Documentation
64+
65+
For more details, see the [installation guide](https://github.com/${{ github.repository }}/blob/main/install/README.md).

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,35 @@ See **[docs/quickstart.md](docs/quickstart.md)** for a step-by-step guide from z
2323

2424
### Prerequisites
2525

26-
- Docker installed on your machine
26+
- **Docker Desktop** (Windows/macOS) or **Docker Engine** (Linux) installed and running
27+
- **PowerShell 7+** (Windows only)
2728
- An LLM API key (e.g., Qwen, OpenAI)
2829
- (Optional) A GitHub Personal Access Token for GitHub collaboration features
2930

3031
### Installation
3132

33+
#### macOS / Linux
34+
3235
```bash
3336
# Quick install (interactive)
34-
bash <(curl -sSL https://higress.ai/hiclaw/install.sh)
37+
bash <(curl -fsSL https://higress.ai/hiclaw/install.sh)
3538

3639
# Or clone and install
3740
git clone https://github.com/higress-group/hiclaw.git && cd hiclaw
3841
HICLAW_LLM_API_KEY="sk-xxx" make install
3942
```
4043

44+
#### Windows (PowerShell 7+)
45+
46+
```powershell
47+
# Quick install (interactive)
48+
Invoke-Expression (Invoke-WebRequest -Uri "https://higress.ai/hiclaw/install.ps1" -UseBasicParsing).Content
49+
50+
# Or download and run
51+
Invoke-WebRequest -Uri "https://higress.ai/hiclaw/install.ps1" -OutFile "hiclaw-install.ps1"
52+
.\hiclaw-install.ps1
53+
```
54+
4155
The installation script will:
4256
1. **Detect your timezone** (supports Linux and macOS) for optimal registry selection
4357
2. **Prompt for configuration** (LLM provider, API key, ports, etc.) - all can be pre-set via environment variables
@@ -46,6 +60,8 @@ The installation script will:
4660

4761
#### Installation Options
4862

63+
**macOS / Linux:**
64+
4965
```bash
5066
# Non-interactive mode (use all defaults)
5167
HICLAW_NON_INTERACTIVE=1 HICLAW_LLM_API_KEY="sk-xxx" make install
@@ -66,6 +82,23 @@ HICLAW_TIMEZONE=Asia/Shanghai \
6682
make install
6783
```
6884

85+
**Windows (PowerShell):**
86+
87+
```powershell
88+
# Non-interactive mode (use all defaults)
89+
$env:HICLAW_NON_INTERACTIVE = "1"
90+
$env:HICLAW_LLM_API_KEY = "sk-xxx"
91+
.\hiclaw-install.ps1
92+
93+
# Pre-configure all settings
94+
$env:HICLAW_LLM_PROVIDER = "qwen"
95+
$env:HICLAW_DEFAULT_MODEL = "qwen3.5-plus"
96+
$env:HICLAW_LLM_API_KEY = "sk-xxx"
97+
$env:HICLAW_ADMIN_USER = "admin"
98+
$env:HICLAW_ADMIN_PASSWORD = "yourpassword"
99+
.\hiclaw-install.ps1
100+
```
101+
69102
#### Upgrade or Reinstall
70103

71104
When running the install script on an existing installation, you'll be prompted:

README.zh-CN.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,35 @@ HiClaw 让你部署一支 AI Agent 团队,通过即时通讯(Matrix 协议
2323

2424
### 前置条件
2525

26-
- 已安装 Docker
26+
- **Docker Desktop**(Windows/macOS)或 **Docker Engine**(Linux)已安装并运行
27+
- **PowerShell 7+**(仅 Windows)
2728
- LLM API Key(如通义千问、OpenAI 等)
2829
- (可选)GitHub Personal Access Token,用于 GitHub 协作功能
2930

3031
### 安装
3132

33+
#### macOS / Linux
34+
3235
```bash
3336
# 一键安装(交互式)
34-
bash <(curl -sSL https://higress.ai/hiclaw/install.sh)
37+
bash <(curl -fsSL https://higress.ai/hiclaw/install.sh)
3538

3639
# 或克隆后安装
3740
git clone https://github.com/higress-group/hiclaw.git && cd hiclaw
3841
HICLAW_LLM_API_KEY="sk-xxx" make install
3942
```
4043

44+
#### Windows(PowerShell 7+)
45+
46+
```powershell
47+
# 一键安装(交互式)
48+
Invoke-Expression (Invoke-WebRequest -Uri "https://higress.ai/hiclaw/install.ps1" -UseBasicParsing).Content
49+
50+
# 或下载后运行
51+
Invoke-WebRequest -Uri "https://higress.ai/hiclaw/install.ps1" -OutFile "hiclaw-install.ps1"
52+
.\hiclaw-install.ps1
53+
```
54+
4155
安装脚本会自动:
4256
1. **检测时区**(支持 Linux 和 macOS),选择最优镜像源
4357
2. **交互式配置**(LLM 提供商、API Key、端口等)——也可通过环境变量预设
@@ -46,6 +60,8 @@ HICLAW_LLM_API_KEY="sk-xxx" make install
4660

4761
#### 安装选项
4862

63+
**macOS / Linux:**
64+
4965
```bash
5066
# 非交互模式(使用全部默认值)
5167
HICLAW_NON_INTERACTIVE=1 HICLAW_LLM_API_KEY="sk-xxx" make install
@@ -66,6 +82,23 @@ HICLAW_TIMEZONE=Asia/Shanghai \
6682
make install
6783
```
6884

85+
**Windows(PowerShell):**
86+
87+
```powershell
88+
# 非交互模式(使用全部默认值)
89+
$env:HICLAW_NON_INTERACTIVE = "1"
90+
$env:HICLAW_LLM_API_KEY = "sk-xxx"
91+
.\hiclaw-install.ps1
92+
93+
# 预设所有配置
94+
$env:HICLAW_LLM_PROVIDER = "qwen"
95+
$env:HICLAW_DEFAULT_MODEL = "qwen3.5-plus"
96+
$env:HICLAW_LLM_API_KEY = "sk-xxx"
97+
$env:HICLAW_ADMIN_USER = "admin"
98+
$env:HICLAW_ADMIN_PASSWORD = "yourpassword"
99+
.\hiclaw-install.ps1
100+
```
101+
69102
#### 升级或重装
70103

71104
在已有安装上再次运行安装脚本时,会提示选择操作:

install/README.md

Lines changed: 159 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,67 @@
22

33
One-click installation script for HiClaw Manager and Worker Agents.
44

5+
## Requirements
6+
7+
- **Docker Desktop** (Windows/macOS) or **Docker Engine** (Linux) must be installed and running
8+
- **PowerShell 7+** (Windows only)
9+
10+
## Quick Start
11+
12+
### macOS / Linux
13+
14+
```bash
15+
bash <(curl -fsSL https://raw.githubusercontent.com/higress-group/hiclaw/main/install/hiclaw-install.sh)
16+
```
17+
18+
### Windows (PowerShell 7+)
19+
20+
```powershell
21+
Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/higress-group/hiclaw/main/install/hiclaw-install.ps1" -UseBasicParsing).Content
22+
```
23+
24+
Or download and run:
25+
26+
```powershell
27+
# Download
28+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/higress-group/hiclaw/main/install/hiclaw-install.ps1" -OutFile "hiclaw-install.ps1"
29+
30+
# Run
31+
.\hiclaw-install.ps1
32+
```
33+
34+
## Installation Modes
35+
36+
### Quick Start (Recommended)
37+
38+
Fast installation with Alibaba Cloud Bailian as the default LLM provider. Just provide your API key and go!
39+
40+
### Manual
41+
42+
Customize each option:
43+
- LLM Provider (Alibaba Cloud Bailian or OpenAI-compatible)
44+
- Admin credentials
45+
- Port configuration
46+
- Domain names
47+
- GitHub PAT (optional)
48+
- Data persistence options
49+
550
## Usage
651

752
### Install Manager
853

54+
**macOS / Linux:**
955
```bash
1056
./hiclaw-install.sh manager
57+
# or simply
58+
./hiclaw-install.sh
59+
```
60+
61+
**Windows:**
62+
```powershell
63+
.\hiclaw-install.ps1 manager
64+
# or simply
65+
.\hiclaw-install.ps1
1166
```
1267

1368
Interactive prompts will ask for:
@@ -20,23 +75,121 @@ Interactive prompts will ask for:
2075

2176
Workers are created by the Manager Agent through conversation. The Manager provides the exact command to run:
2277

78+
**macOS / Linux:**
2379
```bash
2480
./hiclaw-install.sh worker \
2581
--name alice \
26-
--matrix-server http://matrix-local.hiclaw.io:8080 \
27-
--gateway http://aigw-local.hiclaw.io:8080 \
28-
--fs http://fs-local.hiclaw.io:8080 \
82+
--fs http://fs-local.hiclaw.io:18080 \
2983
--fs-key <ACCESS_KEY> \
3084
--fs-secret <SECRET_KEY>
3185
```
3286

87+
**Windows:**
88+
```powershell
89+
.\hiclaw-install.ps1 worker `
90+
-Name alice `
91+
-Fs http://fs-local.hiclaw.io:18080 `
92+
-FsKey <ACCESS_KEY> `
93+
-FsSecret <SECRET_KEY>
94+
```
95+
3396
### Reset Worker
3497

98+
**macOS / Linux:**
3599
```bash
36100
./hiclaw-install.sh worker --reset --name alice \
37-
--matrix-server http://matrix-local.hiclaw.io:8080 \
38-
--gateway http://aigw-local.hiclaw.io:8080 \
39-
--fs http://fs-local.hiclaw.io:8080 \
101+
--fs http://fs-local.hiclaw.io:18080 \
40102
--fs-key <ACCESS_KEY> \
41103
--fs-secret <SECRET_KEY>
42104
```
105+
106+
**Windows:**
107+
```powershell
108+
.\hiclaw-install.ps1 worker -Reset `
109+
-Name alice `
110+
-Fs http://fs-local.hiclaw.io:18080 `
111+
-FsKey <ACCESS_KEY> `
112+
-FsSecret <SECRET_KEY>
113+
```
114+
115+
### Uninstall
116+
117+
**macOS / Linux:**
118+
```bash
119+
./hiclaw-install.sh uninstall
120+
```
121+
122+
**Windows:**
123+
```powershell
124+
.\hiclaw-install.ps1 uninstall
125+
```
126+
127+
## Non-Interactive Mode (Automation)
128+
129+
Set environment variables to skip prompts:
130+
131+
**macOS / Linux:**
132+
```bash
133+
export HICLAW_NON_INTERACTIVE=1
134+
export HICLAW_LLM_API_KEY="your-api-key"
135+
./hiclaw-install.sh
136+
```
137+
138+
**Windows:**
139+
```powershell
140+
$env:HICLAW_NON_INTERACTIVE = "1"
141+
$env:HICLAW_LLM_API_KEY = "your-api-key"
142+
.\hiclaw-install.ps1
143+
```
144+
145+
## Environment Variables
146+
147+
| Variable | Description | Default |
148+
|----------|-------------|---------|
149+
| `HICLAW_NON_INTERACTIVE` | Skip all prompts | `0` |
150+
| `HICLAW_LLM_PROVIDER` | LLM provider (`qwen` or `openai-compat`) | `qwen` |
151+
| `HICLAW_DEFAULT_MODEL` | Default model ID | `qwen3.5-plus` |
152+
| `HICLAW_LLM_API_KEY` | LLM API key | *(required)* |
153+
| `HICLAW_ADMIN_USER` | Admin username | `admin` |
154+
| `HICLAW_ADMIN_PASSWORD` | Admin password | *(auto-generated)* |
155+
| `HICLAW_PORT_GATEWAY` | Gateway port | `18080` |
156+
| `HICLAW_PORT_CONSOLE` | Higress console port | `18001` |
157+
| `HICLAW_MATRIX_DOMAIN` | Matrix domain | `matrix-local.hiclaw.io:18080` |
158+
| `HICLAW_DATA_DIR` | Data directory | Docker volume |
159+
| `HICLAW_WORKSPACE_DIR` | Manager workspace | `~/hiclaw-manager` |
160+
| `HICLAW_VERSION` | Image tag | `latest` |
161+
| `HICLAW_REGISTRY` | Image registry | *(auto-detected by timezone)* |
162+
163+
## Platform Notes
164+
165+
### Windows
166+
167+
- Requires **PowerShell 7+** (PowerShell Core)
168+
- Docker Desktop must be running with WSL 2 backend
169+
- The script uses named pipe (`//var/run/docker.sock`) for Docker socket mount
170+
171+
### macOS
172+
173+
- Docker Desktop must be running
174+
- Supports both Intel (amd64) and Apple Silicon (arm64)
175+
176+
### Linux
177+
178+
- Docker Engine or Docker Desktop required
179+
- Supports both amd64 and arm64 architectures
180+
181+
## Post-Installation
182+
183+
After successful installation:
184+
185+
1. Open the Element Web URL in your browser
186+
2. Login with your admin credentials
187+
3. Start chatting with the Manager agent
188+
189+
### Mobile Access
190+
191+
You can also access HiClaw from mobile devices using FluffyChat or Element Mobile:
192+
193+
1. Download FluffyChat or Element on your phone
194+
2. Set homeserver to: `http://<your-lan-ip>:18080`
195+
3. Login with your admin credentials

0 commit comments

Comments
 (0)