Files
yuqei 124a18a4ec
Deploy VitePress Docs / build (push) Has been cancelled
Deploy VitePress Docs / deploy (push) Has been cancelled
Initialize cc-haha project mirror.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 13:41:51 +08:00

80 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 快速开始
## 1. 安装 Bun
```bash
# macOS / Linux
curl -fsSL https://bun.sh/install | bash
# macOS (Homebrew)
brew install bun
# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"
```
> 精简版 Linux 如提示 `unzip is required`,先运行 `apt update && apt install -y unzip`
## 2. 安装依赖并配置
```bash
bun install
cp .env.example .env
# 编辑 .env 填入你的 API Key,详见「环境变量」文档
```
环境变量的完整说明请参考 [环境变量配置](./env-vars.md)。
## 3. 启动
### macOS / Linux
```bash
./bin/claude-haha # 交互 TUI 模式
./bin/claude-haha -p "your prompt here" # 无头模式
./bin/claude-haha --help # 查看所有选项
```
### Windows
> **前置要求**:必须安装 [Git for Windows](https://git-scm.com/download/win)
```powershell
# PowerShell / cmd 直接调用 Bun
bun --env-file=.env ./src/entrypoints/cli.tsx
# 或在 Git Bash 中运行
./bin/claude-haha
```
## 4. 全局使用(可选)
将 `bin/` 加入 PATH 后可在任意目录启动,详见 [全局使用指南](./global-usage.md):
```bash
export PATH="$HOME/path/to/claude-code-haha/bin:$PATH"
```
## 5. 大型项目高效协作(强烈推荐)
如果你准备长期与 Claude 一起开发大型软件项目,建议固定采用这套协作流程:
- [协作模板导航](./collaboration-templates.md)
- [高效协作开发流程](./high-efficiency-workflow.md)
它包含:
- 项目第一天立项模板
- 每日启动模板
- 完整协作方法论
- 高效开发节奏
- 大型项目拆分方法
## 6. 降级模式
如果 Ink TUI 出现问题,可以使用降级 Recovery CLI 模式:
```bash
CLAUDE_CODE_FORCE_RECOVERY_CLI=1 ./bin/claude-haha
```