docs: add Windows startup instructions to README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Relakkes Yang
2026-04-01 13:58:32 +08:00
parent d166eb89b6
commit 430502e7bb
2 changed files with 60 additions and 0 deletions
+30
View File
@@ -113,6 +113,8 @@ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
### 4. 启动
#### macOS / Linux
```bash
# 交互 TUI 模式(完整界面)
./bin/claude-haha
@@ -127,6 +129,34 @@ echo "explain this code" | ./bin/claude-haha -p
./bin/claude-haha --help
```
#### Windows
> **前置要求**:必须安装 [Git for Windows](https://git-scm.com/download/win)(提供 Git Bash,项目内部 Shell 执行依赖它)。
Windows 下启动脚本 `bin/claude-haha` 是 bash 脚本,无法在 cmd / PowerShell 中直接运行。请使用以下方式:
**方式一:PowerShell / cmd 直接调用 Bun(推荐)**
```powershell
# 交互 TUI 模式
bun --env-file=.env ./src/entrypoints/cli.tsx
# 无头模式
bun --env-file=.env ./src/entrypoints/cli.tsx -p "your prompt here"
# 降级 Recovery CLI
bun --env-file=.env ./src/localRecoveryCli.ts
```
**方式二:Git Bash 中运行**
```bash
# 在 Git Bash 终端中,与 macOS/Linux 用法一致
./bin/claude-haha
```
> **注意**:部分功能(语音输入、Computer Use、Sandbox 隔离等)在 Windows 上不可用,不影响核心 TUI 交互。
---
## 环境变量说明