Files
claude-code/README.md
claude-code-best 494eab7204 feat: 接入内建 weixin channel(同 #301 重构版本) (#303)
* feat: 接入 weixin 服务层与命令入口

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* feat: 注册内建 weixin channel 插件

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: 修正 channel permission relay 路由与能力判定

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: 修复 builtin channel 的 ChannelsNotice 误报

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* docs: 补充内建 weixin channel 使用说明

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* docs: 更新微信 channel 接入计划状态

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: 延迟加载 weixin 登录二维码依赖

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: 改用 qrcode 生成 weixin 登录二维码

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* fix: 修正 vite 构建的 Windows 路径解析

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

* chore: 删除临时规划文档 wx_channel.md 并还原 package.json 排序

wx_channel.md 内容已整合到 docs/features/channels.md,不再需要。
package.json 中 @ant/model-provider 位置从原始位置被无意移动,还原。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: 将 weixin 模块从 src/ 迁移至 packages/weixin 工作区包

将 src/services/weixin/ 中的纯业务逻辑迁入 @claude-code-best/weixin
workspace 包,降低 src/ 耦合度。仅保留 server.ts 作为薄适配层。

- 迁移 7 个无修改的纯模块 (types/api/accounts/login/pairing/media/send)
- monitor.ts 内联 PERMISSION_REPLY_RE 正则,解除对 src/ 的依赖
- permissions.ts 本地定义 ChannelPermissionRequestParams 接口
- cli.ts 拆分:serve 子命令通过回调注入,login/access 保留在包内
- server.ts 重写为从 @claude-code-best/weixin 导入
- 新增 cli-serve.ts 作为 serve 入口薄壳

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: 修正 weixin barrel export 中 interface 的导出方式

ChannelPermissionRequestParams 是纯类型,必须用 export type 导出,
否则 Bun 运行时会报 "export not found" 错误。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: 将 server.ts 迁入 packages/weixin,彻底移除 src/services/weixin/

通过依赖注入(WeixinServerDeps)解耦 src/ 依赖(analytics、config、
MCP channel schema),server.ts 完全移入包内。cli.tsx 入口处一次性
注入所有依赖。

src/services/weixin/ 目录已完全删除。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: 修复 markdownToPlainText 中代码块正则的 ReDoS 风险

用非正则的线性扫描替代 \`\`\`[\s\S]*?\n([\s\S]*?)\`\`\` 匹配,
避免在含有大量重复 \`\`\` 序列的输入上触发多项式回溯。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: 1111 <11111@asd.c>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 21:33:27 +08:00

8.8 KiB
Raw Blame History

Claude Code Best V5 (CCB)

GitHub Stars GitHub Contributors GitHub Issues GitHub License Last Commit Bun Discord

Which Claude do you like? The open source one is the best.

牢 A (Anthropic) 官方 Claude Code CLI 工具的源码反编译/逆向还原项目。目标是将 Claude Code 大部分功能及工程化能力复现 (问就是老佛爷已经付过钱了)。虽然很难绷, 但是它叫做 CCB(踩踩背)... 而且, 我们实现了企业版或者需要登陆 Claude 账号才能使用的特性, 实现技术普惠

文档在这里, 支持投稿 PR | 留影文档在这里 | Discord 群组

特性 说明 文档
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 可以开关
Channels 频道通知 MCP 服务器推送外部消息到会话(飞书/Slack/Discord/微信等),--channels plugin:name@marketplace 启用 文档
自定义模型供应商 OpenAI/Anthropic/Gemini/Grok 兼容 文档
Voice Mode Push-to-Talk 语音输入 文档
Computer Use 屏幕截图、键鼠控制 文档
Chrome Use 浏览器自动化、表单填写、数据抓取 自托管 原生版
Sentry 企业级错误追踪 文档
GrowthBook 企业级特性开关 文档
/dream 记忆整理 自动整理和优化记忆文件 文档

快速开始(安装版)

不用克隆仓库, 从 NPM 下载后, 直接使用

bun  i -g claude-code-best
bun pm -g trust claude-code-best
ccb # 以 nodejs 打开 claude code
ccb-bun # 以 bun 形态打开
CLAUDE_BRIDGE_BASE_URL=https://remote-control.claude-code-best.win/ CLAUDE_BRIDGE_OAUTH_TOKEN=test-my-key ccb --remote-control # 我们有自部署的远程控制

快速开始(源码版)

⚙️ 环境要求

一定要最新版本的 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, 我们优先解决

👤 新人配置 /login

首次运行后,在 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 Flags

所有功能开关通过 FEATURE_<FLAG_NAME>=1 环境变量启用,例如:

FEATURE_BUDDY=1 FEATURE_FORK_SUBAGENT=1 bun run dev

各 Feature 的详细说明见 docs/features/ 目录,欢迎投稿补充。

VS Code 调试

TUI (REPL) 模式需要真实终端,无法直接通过 VS Code launch 启动调试。使用 attach 模式

步骤

  1. 终端启动 inspect 服务

    bun run dev:inspect
    

    会输出类似 ws://localhost:8888/xxxxxxxx 的地址。

  2. VS Code 附着调试器

    • src/ 文件中打断点
    • F5 → 选择 "Attach to Bun (TUI debug)"

Teach Me 学习项目

我们新加了一个 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/ 目录下,支持跨主题学习者档案。

相关文档及网站

Contributors

Contributors

Star History

Star History Chart

许可证

本项目仅供学习研究用途。Claude Code 的所有权利归 Anthropic 所有。