浏览代码

docs: add Windows startup instructions to README

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Relakkes Yang 3 周之前
父节点
当前提交
430502e7bb
共有 2 个文件被更改,包括 60 次插入0 次删除
  1. 30 0
      README.en.md
  2. 30 0
      README.md

+ 30 - 0
README.en.md

@@ -113,6 +113,8 @@ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
 
 ### 4. Start
 
+#### macOS / Linux
+
 ```bash
 # Interactive TUI mode (full interface)
 ./bin/claude-haha
@@ -127,6 +129,34 @@ echo "explain this code" | ./bin/claude-haha -p
 ./bin/claude-haha --help
 ```
 
+#### Windows
+
+> **Prerequisite**: [Git for Windows](https://git-scm.com/download/win) must be installed (provides Git Bash, which the project's internal shell execution depends on).
+
+The startup script `bin/claude-haha` is a bash script and cannot run directly in cmd or PowerShell. Use one of the following methods:
+
+**Option 1: PowerShell / cmd — call Bun directly (recommended)**
+
+```powershell
+# Interactive TUI mode
+bun --env-file=.env ./src/entrypoints/cli.tsx
+
+# Headless mode
+bun --env-file=.env ./src/entrypoints/cli.tsx -p "your prompt here"
+
+# Fallback Recovery CLI
+bun --env-file=.env ./src/localRecoveryCli.ts
+```
+
+**Option 2: Run inside Git Bash**
+
+```bash
+# Same usage as macOS / Linux
+./bin/claude-haha
+```
+
+> **Note**: Some features (voice input, Computer Use, sandbox isolation, etc.) are not available on Windows. This does not affect the core TUI interaction.
+
 ---
 
 ## Environment Variables

+ 30 - 0
README.md

@@ -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 交互。
+
 ---
 
 ## 环境变量说明