@xcanwin/open-claude-code
v0.5.0
Published
Source-built Claude Code repackaged as open-claude-code.
Maintainers
Readme
Open Claude Code
English | 中文
English
Introduction
- Unlike other projects that only unpack the package
Open Claude Codeis the first clean, installable, runnable, and debuggable Agent built from theClaude Codesource code@xcanwin/open-claude-codeis an installable and runnable CLI tool. After installation, you can use theopen-claude-codecommand directly, and its effect is equivalent to theclaudecommand- This project was completed inside the AI Agent security sandbox manyoyo
Quick Start
Requires Node.js >= 20.19.0.
npm install -g @xcanwin/open-claude-code
open-claude-code -v
open-claude-code -h
open-claude-code -p "which model are you?"
open-claude-codeFor Agent Developers
Development and Debugging
npm install
npm run sync:runtime
node ./bin/open-claude-code.js -v
node ./bin/open-claude-code.js -h
node ./bin/open-claude-code.js -p "which model are you?"
node ./bin/open-claude-code.jsbin/open-claude-code.js already forwards --enable-source-maps automatically. You can verify debuggability with:
node ./bin/open-claude-code.js --max-budget-usd -1Pre-release Testing
npm install
npm run sync:runtime
npm install -g .
open-claude-code -v
open-claude-code -h
open-claude-code -p "which model are you?"
open-claude-codeAdditional Notes
Research Process
- Unpack
@anthropic-ai/claude-code - Restore
src/from the source map - Keep the upstream
cli.js/cli.js.map - Recover
src/beside it for debugging
Source Recovery
Official original 2.1.88 backup
If you want to try source map recovery separately, run this small tool:
node ./bin/open-claude-code-recover.js -d ./artifacts -v 2.1.88AI Agent Security Sandbox
- Preferred: manyoyo
- Or run the usage commands above inside
docker run --rm -it node:22-slim bash
中文
介绍
- 与其他单纯解包的项目不同
Open Claude Code是全球首个基于Claude Code源代码的可安装、可运行、可调试、很干净的 Agent@xcanwin/open-claude-code是可安装、可运行的命令行工具,安装后可直接使用open-claude-code命令,效果等于claude命令- 本项目是在 AI Agent 安全沙箱 manyoyo 中完成
快速使用方法
要求 Node.js >= 20.19.0。
npm install -g @xcanwin/open-claude-code
open-claude-code -v
open-claude-code -h
open-claude-code -p "which model are you?"
open-claude-codeAgent开发者
开发调试方法
npm install
npm run sync:runtime
node ./bin/open-claude-code.js -v
node ./bin/open-claude-code.js -h
node ./bin/open-claude-code.js -p "which model are you?"
node ./bin/open-claude-code.js已实现 bin/open-claude-code.js 自动透传 --enable-source-maps,可通过以下方法验证可调试性:
node ./bin/open-claude-code.js --max-budget-usd -1发布前的测试方法
npm install
npm run sync:runtime
npm install -g .
open-claude-code -v
open-claude-code -h
open-claude-code -p "which model are you?"
open-claude-code其他说明
研究历程
- 解包
@anthropic-ai/claude-code - 用 source map 恢复
src/ - 保留上游
cli.js/cli.js.map - 再把恢复出的
src/放到旁边用于调试
源码恢复
若要单独尝试 source map 恢复,可运行这个小工具:
node ./bin/open-claude-code-recover.js -d ./artifacts -v 2.1.88AI Agent 安全沙箱
- 首选 manyoyo
- 或者在
docker run --rm -it node:22-slim bash内执行上述使用方法
