本仓库在 claude-code-best/claude-code 社区源码还原版本的基础上,独立完成了一套完整的 Windows 本地打包方案:通过 bun build --compile 将整个 CLI 连同 Bun 运行时一同嵌入单个 EXE,再经由 ps2exe 编译启动器、Inno Setup 生成安装包,最终产出一个 开箱即用的 Windows 独立安装程序。
用户无需在本机安装 Bun、Node.js 或任何 JavaScript 运行时,双击安装包即可使用 Claude Code 的全部功能。安装程序自动写入用户 PATH,支持 x64 与 arm64,并随附 Computer Use (bridge.py) 和语音捕获模块 (audio-capture.node)。
packaging/build-compile.ts → packaging/output/claude-core.exe (138 MB,嵌入 Bun 运行时)
packaging/launcher.ps1 → packaging/output/ClaudeCode.exe (37 KB,双击启动器)
packaging/installer.iss → packaging/ClaudeCodeBest-Setup-2.1.888.exe (31 MB,安装包)
预构建安装包见 Releases。打包详细说明见
packaging/README.md。
| 特性 | 说明 | 文档 |
|---|---|---|
| Claude 群控技术 | Pipe IPC 多实例协作:同机 main/sub 自动编排 + LAN 跨机器零配置发现与通讯,/pipes 选择面板 + Shift+↓ 交互 + 消息广播路由 |
Pipe IPC / LAN |
| ACP 协议一等一支持 | 支持接入 Zed、Cursor 等 IDE,支持会话恢复、Skills、权限桥接 | 文档 |
| Remote Control 私有部署 | Docker 自托管远程界面, 可以手机上看 CC | 文档 |
| Langfuse 监控 | 企业级 Agent 监控, 可以清晰看到每次 agent loop 细节, 可以一键转化为数据集 | 文档 |
| Web Search | 内置网页搜索工具, 支持 bing 和 brave 搜索 | 文档 |
| Poor Mode | 穷鬼模式,关闭记忆提取和键入建议,大幅度减少并发请求 | /poor 可以开关 |
| 自定义模型供应商 | OpenAI/Anthropic/Gemini/Grok 兼容 | 文档 |
| Voice Mode | Push-to-Talk 语音输入 | 文档 |
| Computer Use | 屏幕截图、键鼠控制 | 文档 |
| Chrome Use | 浏览器自动化、表单填写、数据抓取 | 自托管 原生版 |
| Sentry | 企业级错误追踪 | 文档 |
| GrowthBook | 企业级特性开关 | 文档 |
| /dream 记忆整理 | 自动整理和优化记忆文件 | 文档 |
一定要最新版本的 bun 啊, 不然一堆奇奇怪怪的 BUG!!! bun upgrade!!!
- 📦 Bun >= 1.3.11
- ⚙️ 常规的配置 CC 的方式, 各大提供商都有自己的配置方式
bun install# 开发模式, 看到版本号 888 说明就是对了
bun run dev
# 构建
bun run build构建采用 code splitting 多文件打包(build.ts),产物输出到 dist/ 目录(入口 dist/cli.js + 约 450 个 chunk 文件)。
构建出的版本 bun 和 node 都可以启动, 你 publish 到私有源可以直接启动
如果遇到 bug 请直接提一个 issues, 我们优先解决
首次运行后,在 REPL 中输入 /login 命令进入登录配置界面,选择 Anthropic Compatible 即可对接第三方 API 兼容服务(无需 Anthropic 官方账号)。
选择 OpenAI 和 Gemini 对应的栏目都是支持相应协议的
需要填写的字段:
| 📌 字段 | 📝 说明 | 💡 示例 |
|---|---|---|
| Base URL | API 服务地址 | https://api.example.com/v1 |
| API Key | 认证密钥 | sk-xxx |
| Haiku Model | 快速模型 ID | claude-haiku-4-5-20251001 |
| Sonnet Model | 均衡模型 ID | claude-sonnet-4-6 |
| Opus Model | 高性能模型 ID | claude-opus-4-6 |
- ⌨️ Tab / Shift+Tab 切换字段,Enter 确认并跳到下一个,最后一个字段按 Enter 保存
ℹ️ 支持所有 Anthropic API 兼容服务(如 OpenRouter、AWS Bedrock 代理等),只要接口兼容 Messages API 即可。
所有功能开关通过 FEATURE_<FLAG_NAME>=1 环境变量启用,例如:
FEATURE_BUDDY=1 FEATURE_FORK_SUBAGENT=1 bun run dev各 Feature 的详细说明见 docs/features/ 目录,欢迎投稿补充。
TUI (REPL) 模式需要真实终端,无法直接通过 VS Code launch 启动调试。使用 attach 模式:
-
终端启动 inspect 服务:
bun run dev:inspect
会输出类似
ws://localhost:8888/xxxxxxxx的地址。 -
VS Code 附着调试器:
- 在
src/文件中打断点 - F5 → 选择 "Attach to Bun (TUI debug)"
- 在
我们新加了一个 teach-me skills, 通过问答式引导帮你理解这个项目的任何模块。(调整 sigma skill 而来)
# 在 REPL 中直接输入
/teach-me Claude Code 架构
/teach-me React Ink 终端渲染 --level beginner
/teach-me Tool 系统 --resume- 诊断水平 — 自动评估你对相关概念的掌握程度,跳过已知的、聚焦薄弱的
- 构建学习路径 — 将主题拆解为 5-15 个原子概念,按依赖排序逐步推进
- 苏格拉底式提问 — 用选项引导思考,而非直接给答案
- 错误概念追踪 — 发现并纠正深层误解
- 断点续学 —
--resume从上次进度继续
学习进度保存在 .claude/skills/teach-me/ 目录下,支持跨主题学习者档案。
This project is an unofficial, community-maintained Windows packaging of the claude-code-best decompiled source restoration of Anthropic's Claude Code CLI.
Copyright ownership:
| Layer | Rights Holder | Description |
|---|---|---|
| Claude Code (original) | Anthropic, PBC | All rights reserved. The original Claude Code CLI, its algorithms and compiled artifacts are the exclusive property of Anthropic. |
| Source restoration | claude-code-best contributors | Decompiled/reverse-engineered source reconstruction, feature restoration, and third-party API compatibility layers. |
| Windows packaging | This repository's maintainer | packaging/ directory — build scripts, installer configuration, and launcher. Original contribution, non-commercial terms only. |
This repository thanks the claude-code-best community for their foundational work, and Anthropic for building Claude Code.
本项目是 claude-code-best(Anthropic Claude Code CLI 反编译还原版)的非官方 Windows 打包方案,由社区独立维护。
版权归属:
| 层级 | 权利归属 | 说明 |
|---|---|---|
| Claude Code(原始版本) | Anthropic, PBC | 保留所有权利。原始 Claude Code CLI 工具、算法及编译产物,均为 Anthropic 的专有财产。 |
| 源码还原工作 | claude-code-best 社区贡献者 | 反编译/逆向还原、功能复现、第三方 API 兼容层等工程化工作。 |
| Windows 打包方案 | 本仓库维护者 | packaging/ 目录下的构建脚本、安装脚本、启动器等,为本仓库独立原创贡献,仅供非商业用途。 |
⚠️ This project is NOT affiliated with, endorsed by, or officially supported by Anthropic, PBC in any way.
⚠️ 本项目与 Anthropic, PBC 没有任何隶属关系,未获得 Anthropic 的授权或官方支持。
English:
- This is an unofficial, third-party Windows packaging of a community reverse-engineered source restoration.
- Intended strictly for personal learning and research. Not for production use.
- Requires a valid Anthropic API key and is subject to Anthropic's Terms of Service.
- Pre-built
.exefiles embed code whose copyright belongs to Anthropic. You are solely responsible for ensuring your use complies with applicable laws. - For production use, please use the official Claude Code CLI.
中文:
- 本项目是社区维护的反编译源码的非官方第三方 Windows 打包方案,仅供学习研究。
- 使用本软件需要有效的 Anthropic API 密钥,须遵守 Anthropic 服务条款。
- 预构建可执行文件(
.exe)内嵌了版权归属 Anthropic 的代码,用户须自行确保使用合规。 - 生产环境请使用 官方 Claude Code CLI。
What you CAN do | 可以做的事:
- ✅ 个人非商业使用 / Personal non-commercial use
- ✅ 学习研究源码(尤其是
packaging/打包方案)/ Study source code for learning - ✅ Fork 并修改打包脚本用于自己的非商业项目 / Fork and modify packaging scripts
- ✅ 分享本仓库链接 / Share this repository link
What you CANNOT do | 不可以做的事:
- ❌ 商业用途或集成到商业产品 / Commercial use or integration into paid products
- ❌ 声称为 Anthropic 官方产品或官方发行版 / Claim as official Anthropic product
- ❌ 删除或遮蔽版权声明和致谢信息 / Remove copyright notices or attribution
- ❌ 分发预构建 EXE 时不附带免责声明 / Distribute binaries without this disclaimer
Full terms: LICENSE