cc-haha/docs/guide/global-usage.md
hzchat 253e9aade2 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>
2026-04-22 18:49:14 +08:00

1.1 KiB
Raw Blame History

全局使用(任意目录启动)

如果你希望在任意项目目录直接运行 claude-hahaclaude-haha-desktop,可以通过以下方式配置。配置完成后,claude-haha 会自动识别你当前所在的工作目录,而 claude-haha-desktop 会一键拉起本地 desktop 开发环境。

macOS / Linux

~/.bashrc~/.zshrc 中添加:

# 方式一:添加 PATH推荐
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"

然后重新加载配置:

source ~/.bashrc  # 或 source ~/.zshrc

Windows (Git Bash)

~/.bashrc 中添加:

export PATH="$HOME/path/to/claude-code-haha/bin:$PATH"

验证

配置完成后,进入任意项目目录测试:

cd ~/your-other-project
claude-haha
# 启动后询问「当前目录是什么?」,应显示 ~/your-other-project

claude-haha-desktop
# 应自动拉起 3456 后端、2024 前端,并打开浏览器