mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-27 15:13:37 +08:00
docs: document the desktop launcher workflow
Document claude-haha-desktop in the CLI guides and Web UI installation docs, including the new English desktop pages referenced by the docs sidebar. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
ffd77f68f8
commit
253e9aade2
@ -32,7 +32,31 @@ xattr -cr /Applications/Claude\ Code\ Haha.app
|
||||
|
||||
## Web UI 模式
|
||||
|
||||
如果桌面端安装遇到问题,可以直接通过浏览器使用 Web UI。在项目根目录下分别启动服务端和前端:
|
||||
如果桌面端安装遇到问题,可以直接通过浏览器使用 Web UI。
|
||||
|
||||
### 一键启动(推荐)
|
||||
|
||||
在项目根目录执行:
|
||||
|
||||
```bash
|
||||
./bin/claude-haha-desktop
|
||||
```
|
||||
|
||||
如果你已经把 `bin/` 加入 PATH,也可以直接运行:
|
||||
|
||||
```bash
|
||||
claude-haha-desktop
|
||||
```
|
||||
|
||||
该命令会自动:
|
||||
|
||||
- 启动本地服务端 `127.0.0.1:3456`
|
||||
- 启动 desktop 前端 `127.0.0.1:2024`
|
||||
- 自动打开浏览器访问 `http://127.0.0.1:2024`
|
||||
|
||||
### 手动启动(排障备用)
|
||||
|
||||
如果需要手动排查,可以分别启动服务端和前端:
|
||||
|
||||
```bash
|
||||
# 1. 启动服务端(在项目根目录)
|
||||
|
||||
43
docs/en/desktop/01-quick-start.md
Normal file
43
docs/en/desktop/01-quick-start.md
Normal file
@ -0,0 +1,43 @@
|
||||
# Desktop Quick Start
|
||||
|
||||
## Start the desktop Web UI
|
||||
|
||||
### One-command startup
|
||||
|
||||
From the project root, run:
|
||||
|
||||
```bash
|
||||
./bin/claude-haha-desktop
|
||||
```
|
||||
|
||||
If `bin/` is already on your PATH, you can also run:
|
||||
|
||||
```bash
|
||||
claude-haha-desktop
|
||||
```
|
||||
|
||||
This will:
|
||||
|
||||
- start the local API server on `127.0.0.1:3456`
|
||||
- start the desktop frontend on `127.0.0.1:2024`
|
||||
- open the browser automatically
|
||||
|
||||
### Manual startup
|
||||
|
||||
If you need to debug the startup sequence manually:
|
||||
|
||||
```bash
|
||||
# backend
|
||||
SERVER_PORT=3456 bun run src/server/index.ts
|
||||
|
||||
# frontend
|
||||
cd desktop
|
||||
bun run dev --host 127.0.0.1 --port 2024
|
||||
```
|
||||
|
||||
Then open `http://127.0.0.1:2024`.
|
||||
|
||||
## Next steps
|
||||
|
||||
- See [Installation & Build](./04-installation.md) for platform notes
|
||||
- See the Chinese desktop docs for the full UI walkthrough and architecture details
|
||||
15
docs/en/desktop/02-architecture.md
Normal file
15
docs/en/desktop/02-architecture.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Desktop Architecture
|
||||
|
||||
The desktop stack is split into three main layers:
|
||||
|
||||
- `desktop/src/` — React frontend
|
||||
- `desktop/src-tauri/` — Tauri host layer
|
||||
- `src/server/` — local API and session server
|
||||
|
||||
For now, the most relevant entrypoint for browser-based desktop development is the launcher command:
|
||||
|
||||
```bash
|
||||
./bin/claude-haha-desktop
|
||||
```
|
||||
|
||||
It starts the local server and frontend together for development.
|
||||
9
docs/en/desktop/03-features.md
Normal file
9
docs/en/desktop/03-features.md
Normal file
@ -0,0 +1,9 @@
|
||||
# Desktop Features
|
||||
|
||||
Current desktop-related docs in English cover:
|
||||
|
||||
- one-command startup with `claude-haha-desktop`
|
||||
- Web UI fallback mode
|
||||
- local desktop development entrypoints
|
||||
|
||||
For the complete feature walkthrough, refer to the Chinese desktop documentation until the full English pages are expanded.
|
||||
80
docs/en/desktop/04-installation.md
Normal file
80
docs/en/desktop/04-installation.md
Normal file
@ -0,0 +1,80 @@
|
||||
# Installation & Build
|
||||
|
||||
## Download
|
||||
|
||||
Go to [GitHub Releases](https://github.com/NanmiCoder/cc-haha/releases) and download the package for your platform:
|
||||
|
||||
| Platform | File |
|
||||
|------|------|
|
||||
| macOS (Apple Silicon) | `Claude.Code.Haha_x.x.x_aarch64.dmg` |
|
||||
| macOS (Intel) | `Claude.Code.Haha_x.x.x_x64.dmg` |
|
||||
| Windows (x64) | `Claude.Code.Haha_x.x.x_x64-setup.exe` |
|
||||
|
||||
> Not sure which Mac build you need? Click the Apple menu → About This Mac. Choose `aarch64` for Apple Silicon and `x64` for Intel.
|
||||
|
||||
## macOS Installation
|
||||
|
||||
1. Open the `.dmg` file and drag the app into `Applications`
|
||||
2. If macOS says the app is damaged on first launch, run:
|
||||
|
||||
```bash
|
||||
xattr -cr /Applications/Claude\ Code\ Haha.app
|
||||
```
|
||||
|
||||
> The app is not notarized yet, so macOS may block the first launch until the quarantine attribute is removed.
|
||||
|
||||
## Windows Installation
|
||||
|
||||
1. Run the `.exe` installer and follow the setup flow
|
||||
2. If SmartScreen appears on first launch, click **More info** → **Run anyway**
|
||||
|
||||
> The app is not code-signed yet, so this warning may appear on first launch.
|
||||
|
||||
## Web UI Mode
|
||||
|
||||
If the desktop app cannot be installed, you can run the Web UI in a browser instead.
|
||||
|
||||
### One-command startup (recommended)
|
||||
|
||||
From the project root, run:
|
||||
|
||||
```bash
|
||||
./bin/claude-haha-desktop
|
||||
```
|
||||
|
||||
If `bin/` is already on your PATH, you can also run:
|
||||
|
||||
```bash
|
||||
claude-haha-desktop
|
||||
```
|
||||
|
||||
This command will automatically:
|
||||
|
||||
- start the local API server on `127.0.0.1:3456`
|
||||
- start the desktop frontend on `127.0.0.1:2024`
|
||||
- open the browser at `http://127.0.0.1:2024`
|
||||
|
||||
### Manual startup (for debugging)
|
||||
|
||||
If you need to debug the startup manually, run the backend and frontend separately:
|
||||
|
||||
```bash
|
||||
# 1. Start the backend from the project root
|
||||
SERVER_PORT=3456 bun run src/server/index.ts
|
||||
|
||||
# 2. Start the frontend from the desktop directory
|
||||
cd desktop
|
||||
bun run dev --host 127.0.0.1 --port 2024
|
||||
```
|
||||
|
||||
Then open `http://127.0.0.1:2024` in your browser.
|
||||
|
||||
## FAQ
|
||||
|
||||
**Q: macOS says the app is from an unidentified developer?**
|
||||
|
||||
Right-click the app → choose **Open** → click **Open** in the dialog. You only need to do this once.
|
||||
|
||||
**Q: Windows says WebView2 is missing?**
|
||||
|
||||
Download and install WebView2 from [Microsoft](https://developer.microsoft.com/en-us/microsoft-edge/webview2/).
|
||||
13
docs/en/desktop/index.md
Normal file
13
docs/en/desktop/index.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Desktop Docs
|
||||
|
||||
> A graphical AI coding workspace with multi-session tabs, local server integration, and desktop-style workflows.
|
||||
|
||||
## Documentation
|
||||
|
||||
### [Quick Start](./01-quick-start.md)
|
||||
|
||||
User-facing desktop guide: startup, Web UI access, and where to find the main interface walkthrough.
|
||||
|
||||
### [Installation & Build](./04-installation.md)
|
||||
|
||||
Download instructions, platform notes, and Web UI startup options.
|
||||
@ -1,7 +1,7 @@
|
||||
# Global Usage (Run from Any Directory)
|
||||
|
||||
|
||||
If you want to run `claude-haha` directly from any project directory, set up one of the following. Once configured, `claude-haha` will automatically recognize your current working directory.
|
||||
If you want to run `claude-haha` or `claude-haha-desktop` directly from any project directory, set up one of the following. Once configured, `claude-haha` will automatically recognize your current working directory, while `claude-haha-desktop` will bring up the local desktop dev environment in one command.
|
||||
|
||||
## macOS / Linux
|
||||
|
||||
@ -13,6 +13,7 @@ export PATH="$HOME/path/to/claude-code-haha/bin:$PATH"
|
||||
|
||||
# Option 2: Alias
|
||||
alias claude-haha="$HOME/path/to/claude-code-haha/bin/claude-haha"
|
||||
alias claude-haha-desktop="$HOME/path/to/claude-code-haha/bin/claude-haha-desktop"
|
||||
```
|
||||
|
||||
Then reload the config:
|
||||
@ -37,4 +38,7 @@ After setup, navigate to any project directory and test:
|
||||
cd ~/your-other-project
|
||||
claude-haha
|
||||
# Ask "What is the current directory?" — it should show ~/your-other-project
|
||||
|
||||
claude-haha-desktop
|
||||
# It should start the 3456 API server, the 2024 desktop dev server, and open the browser
|
||||
```
|
||||
|
||||
@ -33,6 +33,7 @@ See [Environment Variables](./env-vars.md) for the full reference.
|
||||
./bin/claude-haha # Interactive TUI mode
|
||||
./bin/claude-haha -p "your prompt here" # Headless mode
|
||||
./bin/claude-haha --help # Show all options
|
||||
./bin/claude-haha-desktop # Start the desktop dev server, local API server, and browser together
|
||||
```
|
||||
|
||||
### Windows
|
||||
@ -53,6 +54,9 @@ Add `bin/` to your PATH to run from any directory. See [Global Usage Guide](./gl
|
||||
|
||||
```bash
|
||||
export PATH="$HOME/path/to/claude-code-haha/bin:$PATH"
|
||||
|
||||
claude-haha
|
||||
claude-haha-desktop
|
||||
```
|
||||
|
||||
## 5. Recovery Mode
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# 全局使用(任意目录启动)
|
||||
|
||||
|
||||
如果你希望在任意项目目录直接运行 `claude-haha`,可以通过以下方式配置。配置完成后,`claude-haha` 会自动识别你当前所在的工作目录。
|
||||
如果你希望在任意项目目录直接运行 `claude-haha` 或 `claude-haha-desktop`,可以通过以下方式配置。配置完成后,`claude-haha` 会自动识别你当前所在的工作目录,而 `claude-haha-desktop` 会一键拉起本地 desktop 开发环境。
|
||||
|
||||
## macOS / Linux
|
||||
|
||||
@ -13,6 +13,7 @@ export PATH="$HOME/path/to/claude-code-haha/bin:$PATH"
|
||||
|
||||
# 方式二:alias
|
||||
alias claude-haha="$HOME/path/to/claude-code-haha/bin/claude-haha"
|
||||
alias claude-haha-desktop="$HOME/path/to/claude-code-haha/bin/claude-haha-desktop"
|
||||
```
|
||||
|
||||
然后重新加载配置:
|
||||
@ -37,4 +38,7 @@ export PATH="$HOME/path/to/claude-code-haha/bin:$PATH"
|
||||
cd ~/your-other-project
|
||||
claude-haha
|
||||
# 启动后询问「当前目录是什么?」,应显示 ~/your-other-project
|
||||
|
||||
claude-haha-desktop
|
||||
# 应自动拉起 3456 后端、2024 前端,并打开浏览器
|
||||
```
|
||||
|
||||
@ -33,6 +33,7 @@ cp .env.example .env
|
||||
./bin/claude-haha # 交互 TUI 模式
|
||||
./bin/claude-haha -p "your prompt here" # 无头模式
|
||||
./bin/claude-haha --help # 查看所有选项
|
||||
./bin/claude-haha-desktop # 一键启动 desktop dev server + 本地 API + 浏览器
|
||||
```
|
||||
|
||||
### Windows
|
||||
@ -53,6 +54,9 @@ bun --env-file=.env ./src/entrypoints/cli.tsx
|
||||
|
||||
```bash
|
||||
export PATH="$HOME/path/to/claude-code-haha/bin:$PATH"
|
||||
|
||||
claude-haha
|
||||
claude-haha-desktop
|
||||
```
|
||||
|
||||
## 5. 降级模式
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user