docs: 重写 README 精炼开头,补充桌面端预览与赞助信息,更新 Computer Use Windows 支持

- README/README.en:精简开头为单句介绍,新增桌面端预览区(2x3 截图网格 + 下载按钮)、桌面端导航链接、赞助与合作联系方式
- docs/index:首页新增桌面端功能卡片,logo 替换为去背景透明 PNG
- docs/features/computer-use:更新 Windows 平台完整支持说明,补充 win_helper.py 和 Windows 依赖说明

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
程序员阿江(Relakkes) 2026-04-16 11:26:36 +08:00
parent 467bc85300
commit 970521a41f
5 changed files with 103 additions and 34 deletions

View File

@ -1,9 +1,5 @@
# Claude Code Haha
<p align="center">
<img src="docs/images/app-icon.jpg" alt="Claude Code Haha" width="128" style="border-radius: 22px;">
</p>
<p align="center">
<img src="docs/images/logo-horizontal.jpg" alt="Claude Code Haha" width="480">
</p>
@ -21,12 +17,10 @@
</div>
A **locally runnable version** repaired from the leaked Claude Code source, with support for any Anthropic-compatible API endpoint such as MiniMax and OpenRouter.
> The original leaked source does not run as-is. This repository fixes multiple blocking issues in the startup path so the full Ink TUI can work locally.
A **locally runnable version** repaired from the leaked Claude Code source, with support for any Anthropic-compatible API endpoint (MiniMax, OpenRouter, etc.). Beyond the full TUI, we've also completed Computer Use (macOS / Windows), built a GUI **desktop app**, and enabled **full remote control** via Telegram / Feishu.
<p align="center">
<a href="#features">Features</a> · <a href="#architecture-overview">Architecture</a> · <a href="#quick-start">Quick Start</a> · <a href="docs/en/guide/env-vars.md">Env Vars</a> · <a href="docs/en/guide/faq.md">FAQ</a> · <a href="docs/en/guide/global-usage.md">Global Usage</a> · <a href="#more-documentation">More Docs</a>
<a href="#features">Features</a> · <a href="#desktop-preview">Desktop</a> · <a href="#architecture-overview">Architecture</a> · <a href="#quick-start">Quick Start</a> · <a href="docs/en/guide/env-vars.md">Env Vars</a> · <a href="docs/en/guide/faq.md">FAQ</a> · <a href="docs/en/guide/global-usage.md">Global Usage</a> · <a href="#more-documentation">More Docs</a>
</p>
---
@ -42,6 +36,7 @@ A **locally runnable version** repaired from the leaked Claude Code source, with
- **Skills System** (extensible capability plugins, custom workflows) — [Usage Guide](docs/skills/01-usage-guide.md) | [Implementation](docs/skills/02-implementation.md)
- **Channel System** (remote Agent control via Telegram/Feishu/Discord IM platforms) — [Architecture](docs/en/channel/01-channel-system.md)
- **Computer Use desktop control** — [Guide](docs/en/features/computer-use.md) | [Architecture](docs/en/features/computer-use-architecture.md)
- **Desktop App** (Tauri 2 + React GUI client, multi-tab multi-session) — [Docs](docs/desktop/)
- Fallback Recovery CLI mode (`CLAUDE_CODE_FORCE_RECOVERY_CLI=1 ./bin/claude-haha`)
---
@ -65,6 +60,29 @@ A **locally runnable version** repaired from the leaked Claude Code source, with
---
## Desktop Preview
<p align="center">
<a href="https://github.com/NanmiCoder/cc-haha/releases"><img src="https://img.shields.io/badge/⬇_Download_Desktop-macOS_%7C_Windows-D97757?style=for-the-badge" alt="Download Desktop"></a>
&nbsp;
<a href="docs/desktop/04-installation.md"><img src="https://img.shields.io/badge/📖_Install_Guide-Guide-gray?style=for-the-badge" alt="Install Guide"></a>
</p>
<table>
<tr>
<td align="center" width="33%"><img src="docs/images/desktop_ui/01_full_ui.png" alt="Main UI"><br><b>Main Interface</b></td>
<td align="center" width="33%"><img src="docs/images/desktop_ui/02_edit_code.png" alt="Code Editing"><br><b>Code Editing & Diff View</b></td>
<td align="center" width="33%"><img src="docs/images/desktop_ui/03_ask_question_and_permission.png" alt="Permission Control"><br><b>Permission Control & AI Questions</b></td>
</tr>
<tr>
<td align="center" width="33%"><img src="docs/images/desktop_ui/05_settings.png" alt="Provider Settings"><br><b>Multi-Provider Management</b></td>
<td align="center" width="33%"><img src="docs/images/desktop_ui/08_scheduled_task.png" alt="Scheduled Tasks"><br><b>Scheduled Tasks</b></td>
<td align="center" width="33%"><img src="docs/images/desktop_ui/07_im.png" alt="IM Adapters"><br><b>IM Adapters (Telegram / Feishu)</b></td>
</tr>
</table>
---
## Quick Start
### 1. Install Bun
@ -182,6 +200,7 @@ http://127.0.0.1:2024
| [Skills System](docs/skills/01-usage-guide.md) | Extensible capability plugins, custom workflows and conditional activation |
| [Channel System](docs/en/channel/01-channel-system.md) | Remote Agent control via Telegram/Feishu/Discord IM platforms |
| [Computer Use](docs/en/features/computer-use.md) | Desktop control (screenshots, mouse, keyboard) — [Architecture](docs/en/features/computer-use-architecture.md) |
| [Desktop App](docs/desktop/) | Tauri 2 + React GUI client — [Quick Start](docs/desktop/01-quick-start.md) \| [Architecture](docs/desktop/02-architecture.md) \| [Installation](docs/desktop/04-installation.md) |
| [Global Usage](docs/en/guide/global-usage.md) | Run claude-haha from any directory |
| [FAQ](docs/en/guide/faq.md) | Common error troubleshooting |
| [Source Fixes](docs/en/reference/fixes.md) | Fixes compared with the original leaked source |
@ -189,6 +208,14 @@ http://127.0.0.1:2024
---
## Sponsorship & Partnership
This project is maintained in the author's spare time. Corporate or individual sponsorships are welcome to support ongoing development. Custom features, integrations, and business partnerships are also open for discussion.
📧 **Contact**: relakkes@gmail.com
---
## Disclaimer
This repository is based on the Claude Code source leaked from the Anthropic npm registry on 2026-03-31. All original source code copyrights belong to [Anthropic](https://www.anthropic.com). It is provided for learning and research purposes only.

View File

@ -1,9 +1,5 @@
# Claude Code Haha
<p align="center">
<img src="docs/images/app-icon.jpg" alt="Claude Code Haha" width="128" style="border-radius: 22px;">
</p>
<p align="center">
<img src="docs/images/logo-horizontal.jpg" alt="Claude Code Haha" width="480">
</p>
@ -21,12 +17,10 @@
</div>
基于 Claude Code 泄露源码修复的**本地可运行版本**,支持接入任意 Anthropic 兼容 API如 MiniMax、OpenRouter 等)。
> 原始泄露源码无法直接运行。本仓库修复了启动链路中的多个阻塞问题,使完整的 Ink TUI 交互界面可以在本地工作。
基于 Claude Code 泄露源码修复的**本地可运行版本**,支持接入任意 Anthropic 兼容 APIMiniMax、OpenRouter 等)。在完整 TUI 之外,还补全了 Computer UsemacOS / Windows、打造了图形化**桌面端**,并支持通过 Telegram / 飞书**完整远程驱动**。
<p align="center">
<a href="#功能">功能</a> · <a href="#架构概览">架构概览</a> · <a href="#快速开始">快速开始</a> · <a href="docs/guide/env-vars.md">环境变量</a> · <a href="docs/guide/faq.md">FAQ</a> · <a href="docs/guide/global-usage.md">全局使用</a> · <a href="#更多文档">更多文档</a>
<a href="#功能">功能</a> · <a href="#桌面端预览">桌面端</a> · <a href="#架构概览">架构概览</a> · <a href="#快速开始">快速开始</a> · <a href="docs/guide/env-vars.md">环境变量</a> · <a href="docs/guide/faq.md">FAQ</a> · <a href="docs/guide/global-usage.md">全局使用</a> · <a href="#更多文档">更多文档</a>
</p>
---
@ -42,6 +36,7 @@
- **Skills 系统**(可扩展能力插件、自定义工作流)— [使用指南](docs/skills/01-usage-guide.md) | [实现原理](docs/skills/02-implementation.md)
- **Channel 系统**(通过 Telegram/飞书/Discord 等 IM 远程控制 Agent— [架构解析](docs/channel/01-channel-system.md)
- **Computer Use 桌面控制** — [功能指南](docs/features/computer-use.md) | [架构解析](docs/features/computer-use-architecture.md)
- **桌面端**Tauri 2 + React 图形化客户端,多标签多会话)— [文档](docs/desktop/)
- 降级 Recovery CLI 模式(`CLAUDE_CODE_FORCE_RECOVERY_CLI=1 ./bin/claude-haha`
---
@ -65,6 +60,29 @@
---
## 桌面端预览
<p align="center">
<a href="https://github.com/NanmiCoder/cc-haha/releases"><img src="https://img.shields.io/badge/⬇_下载桌面端-macOS_%7C_Windows-D97757?style=for-the-badge" alt="下载桌面端"></a>
&nbsp;
<a href="docs/desktop/04-installation.md"><img src="https://img.shields.io/badge/📖_安装指南-Guide-gray?style=for-the-badge" alt="安装指南"></a>
</p>
<table>
<tr>
<td align="center" width="33%"><img src="docs/images/desktop_ui/01_full_ui.png" alt="主界面"><br><b>主界面</b></td>
<td align="center" width="33%"><img src="docs/images/desktop_ui/02_edit_code.png" alt="代码编辑"><br><b>代码编辑 & Diff 视图</b></td>
<td align="center" width="33%"><img src="docs/images/desktop_ui/03_ask_question_and_permission.png" alt="权限控制"><br><b>权限控制 & AI 提问</b></td>
</tr>
<tr>
<td align="center" width="33%"><img src="docs/images/desktop_ui/05_settings.png" alt="提供商设置"><br><b>多提供商管理</b></td>
<td align="center" width="33%"><img src="docs/images/desktop_ui/08_scheduled_task.png" alt="定时任务"><br><b>定时任务</b></td>
<td align="center" width="33%"><img src="docs/images/desktop_ui/07_im.png" alt="IM 适配器"><br><b>IM 适配器Telegram / 飞书)</b></td>
</tr>
</table>
---
## 快速开始
### 1. 安装 Bun
@ -182,6 +200,7 @@ http://127.0.0.1:2024
| [Skills 系统](docs/skills/01-usage-guide.md) | 可扩展能力插件、自定义工作流与条件激活 |
| [Channel 系统](docs/channel/01-channel-system.md) | 通过 Telegram/飞书/Discord 等 IM 平台远程控制 Agent |
| [Computer Use](docs/features/computer-use.md) | 桌面控制功能(截屏、鼠标、键盘)— [架构解析](docs/features/computer-use-architecture.md) |
| [桌面端](docs/desktop/) | Tauri 2 + React 图形化客户端 — [快速上手](docs/desktop/01-quick-start.md) \| [架构设计](docs/desktop/02-architecture.md) \| [安装指南](docs/desktop/04-installation.md) |
| [全局使用](docs/guide/global-usage.md) | 在任意目录启动 claude-haha |
| [常见问题](docs/guide/faq.md) | 常见错误排查 |
| [源码修复记录](docs/reference/fixes.md) | 相对于原始泄露源码的修复内容 |
@ -189,6 +208,14 @@ http://127.0.0.1:2024
---
## 赞助与合作
本项目由个人利用业余时间维护,欢迎企业或个人赞助支持持续开发,也可洽谈定制、集成或商务合作。
📧 **联系邮箱**relakkes@gmail.com
---
## Disclaimer
本仓库基于 2026-03-31 从 Anthropic npm registry 泄露的 Claude Code 源码。所有原始源码版权归 [Anthropic](https://www.anthropic.com) 所有。仅供学习和研究用途。

View File

@ -1,7 +1,7 @@
# Computer Use 功能指南
> **魔改说明**:本功能是基于 Claude Code 泄露源码中的 Computer Use内部代号 "Chicago")进行的**深度改造版本**。官方实现依赖 Anthropic 内部私有原生模块(`@ant/computer-use-swift``@ant/computer-use-input`),无法公开获取。我们**替换了整个底层操作层**,使用 Python bridge`pyautogui` + `mss` + `pyobjc`)实现所有系统交互,使得任何人都可以在 macOS 上运行 Computer Use 功能。
> **魔改说明**:本功能是基于 Claude Code 泄露源码中的 Computer Use内部代号 "Chicago")进行的**深度改造版本**。官方实现依赖 Anthropic 内部私有原生模块(`@ant/computer-use-swift``@ant/computer-use-input`),无法公开获取。我们**替换了整个底层操作层**,使用 Python bridge 实现所有系统交互——macOS 使用 `pyautogui` + `mss` + `pyobjc`Windows 使用 `pyautogui` + `mss` + `win32gui` + `psutil`,使得任何人都可以在 macOS 和 Windows 上运行 Computer Use 功能。
---
@ -45,14 +45,15 @@ Computer Use 让 AI 模型能够**直接控制你的电脑**——截屏、移
|------|------|------|------|
| macOS | Apple Silicon (M1/M2/M3/M4) | ✅ 完整支持 | 推荐平台 |
| macOS | Intel x86_64 | ✅ 完整支持 | |
| Windows | 任意 | ⚠️ 理论可行 | `pyautogui` + `mss` 跨平台,但 `pyobjc` 部分(应用管理)需替换为 `win32com`,当前未适配 |
| Linux | 任意 | ⚠️ 理论可行 | 同上,需替换 `pyobjc` `wmctrl` + `xdotool`,当前未适配 |
| Windows | x64 | ✅ 完整支持 | 使用 `win32gui` + `psutil` + `pyperclip` + `screeninfo` 替代 macOS 专有 API |
| Linux | 任意 | ⚠️ 理论可行 | 需替换平台专有部分`wmctrl` + `xdotool`,当前未适配 |
### 运行环境要求
- [Bun](https://bun.sh) >= 1.1.0
- Python >= 3.8(首次运行自动创建 venv 并安装依赖)
- macOS 系统权限Accessibility辅助功能+ Screen Recording屏幕录制
- **macOS**:系统权限 Accessibility辅助功能+ Screen Recording屏幕录制
- **Windows**:无需额外权限配置
---
@ -86,11 +87,13 @@ Computer Use 的核心是一个**截图-分析-操作**的闭环:
┌──────────────────────────────────────────────┐
│ Python Bridge │
│ (runtime/mac_helper.py) │
│ macOS: runtime/mac_helper.py │
│ Windows: runtime/win_helper.py │
│ │
│ pyautogui.click(756, 342) ← 鼠标控制 │
│ mss.grab(monitor) ← 截图 │
│ NSWorkspace.open(bundleId) ← 应用管理 │
│ macOS: NSWorkspace.open() ← 应用管理 │
│ Windows: win32gui / psutil ← 应用管理 │
└──────────────────────────────────────────────┘
```
@ -207,8 +210,10 @@ src/
│ ├── setup.ts ← MCP 配置初始化
│ └── ...
└── runtime/
├── mac_helper.py ← Python 实现659 行)
└── requirements.txt ← Python 依赖
├── mac_helper.py ← macOS Python 实现
├── win_helper.py ← Windows Python 实现
├── requirements.txt ← macOS Python 依赖
└── requirements-win.txt ← Windows Python 依赖
```
### 灰度控制绕过
@ -239,8 +244,10 @@ async function callPythonHelper<T>(command: string, payload: object): Promise<T>
首次运行自动完成:
1. 创建 Python 虚拟环境 (`.runtime/venv/`)
2. 安装 pip
3. 安装依赖 (`mss`, `Pillow`, `pyautogui`, `pyobjc-*`)
4. SHA256 哈希验证(仅 requirements.txt 变更时重新安装)
3. 按平台安装依赖:
- **macOS**: `mss`, `Pillow`, `pyautogui`, `pyobjc-*``requirements.txt`
- **Windows**: `mss`, `Pillow`, `pyautogui`, `win32gui`, `psutil`, `pyperclip`, `screeninfo``requirements-win.txt`
4. SHA256 哈希验证(仅 requirements 变更时重新安装)
---
@ -282,7 +289,7 @@ async function callPythonHelper<T>(command: string, payload: object): Promise<T>
| 限制 | 说明 |
|------|------|
| 仅 macOS | Windows/Linux 需要适配 `pyobjc` 部分 |
| 不支持 Linux | 需要适配平台专有 API 部分 |
| 无全局 Escape 中止 | 原生方案用 CGEventTap 实现Python 版暂不支持,用 `Ctrl+C` 代替 |
| 操作前不自动隐藏窗口 | 原生方案的 `prepareDisplay` 依赖 SwiftPython 版未实现 |
| 性能略低 | Python 进程启动 ~100ms 开销,但模型思考时间通常是秒级,用户感知不到 |
@ -303,9 +310,13 @@ async function callPythonHelper<T>(command: string, payload: object): Promise<T>
### 底层依赖
| 库 | 用途 |
|----|------|
| [pyautogui](https://github.com/asweigart/pyautogui) | 鼠标和键盘控制 |
| [mss](https://github.com/BoboTiG/python-mss) | 屏幕截图 |
| [Pillow](https://github.com/python-pillow/Pillow) | 图像处理和压缩 |
| [pyobjc](https://github.com/ronaldoussoren/pyobjc) | macOS Cocoa/Quartz 框架绑定(应用管理、显示枚举) |
| 库 | 平台 | 用途 |
|----|------|------|
| [pyautogui](https://github.com/asweigart/pyautogui) | 跨平台 | 鼠标和键盘控制 |
| [mss](https://github.com/BoboTiG/python-mss) | 跨平台 | 屏幕截图 |
| [Pillow](https://github.com/python-pillow/Pillow) | 跨平台 | 图像处理和压缩 |
| [pyobjc](https://github.com/ronaldoussoren/pyobjc) | macOS | Cocoa/Quartz 框架绑定(应用管理、显示枚举) |
| [pywin32](https://github.com/mhammond/pywin32) | Windows | Win32 API 绑定(窗口管理) |
| [psutil](https://github.com/giampaolo/psutil) | Windows | 进程管理(应用列表、进程操作) |
| [pyperclip](https://github.com/asweigart/pyperclip) | Windows | 剪贴板操作 |
| [screeninfo](https://github.com/rr-/screeninfo) | Windows | 显示器信息(多屏支持) |

BIN
docs/images/app-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -6,7 +6,7 @@ hero:
text: 本地可运行的 Claude Code
tagline: 基于泄露源码修复,支持接入任意 Anthropic 兼容 APIMiniMax、OpenRouter 等)
image:
src: /images/app-icon.jpg
src: /images/app-icon.png
alt: Claude Code Haha
actions:
- theme: brand
@ -44,4 +44,8 @@ features:
title: Computer Use
details: 桌面控制功能 — 截屏、鼠标、键盘操作Python Bridge 实现)
link: /features/computer-use
- icon: "\U0001F5A5"
title: 桌面端
details: 基于 Tauri 2 + React 的图形化客户端多标签、多会话、IM 适配器接入,支持 macOS 和 Windows
link: /desktop/
---