This directory contains the source code of @anthropic-ai/claude-code@2.1.88, extracted from the published npm package's source map (cli.js.map).
npm pack @anthropic-ai/claude-code@2.1.88
tar xzf anthropic-ai-claude-code-2.1.88.tgz
# Extract sources from cli.js.map into source/
node -e '
const fs = require("fs"), path = require("path");
const map = JSON.parse(fs.readFileSync("cli.js.map", "utf8"));
for (let i = 0; i < map.sources.length; i++) {
if (map.sourcesContent[i] == null || map.sources[i].includes("node_modules")) continue;
const rel = map.sources[i].replace(/^\.\.\//g, "");
const out = path.join("source", rel);
fs.mkdirSync(path.dirname(out), { recursive: true });
fs.writeFileSync(out, map.sourcesContent[i]);
}'The bundled cli.js is self-contained and runs directly with Node.js >= 18:
node cli.js --version # 2.1.88 (Claude Code)
node cli.js --help # show all options
node cli.js -p "hello world" # non-interactive one-shot
node cli.js # interactive REPLOr install globally / symlink:
npm install -g @anthropic-ai/claude-code@2.1.88
# or
ln -s "$(pwd)/cli.js" /usr/local/bin/claudeRebuilding from the extracted source is not feasible because:
- The code uses
import { feature } from 'bun:bundle'(Bun bundler compile-time API) - The original
package.jsonwith ~hundreds of build/dev dependencies is not published - Build configuration (tsconfig, bundler config) is not included in the source map
- 2,850 bundled
node_modulesdependencies are only present as source map entries
The extracted source/ tree (1,906 files, 35 MB) is useful for reading and studying the internals, not for rebuilding.
cli.js # 13 MB self-contained Node.js bundle (the actual executable)
cli.js.map # 57 MB source map (contains all original sources)
source/ # extracted source tree:
src/ # 1,902 TypeScript/TSX application files
vendor/ # 4 native module source stubs
package.json # published package manifest (no build deps)
README.md # this file
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows -- all through natural language commands. Use it in your terminal, IDE, or tag @claude on Github.
Learn more at Claude Code Homepage | Documentation
- Install Claude Code:
npm install -g @anthropic-ai/claude-code- Navigate to your project directory and run
claude.
We welcome your feedback. Use the /bug command to report issues directly within Claude Code, or file a GitHub issue.
Join the Claude Developers Discord to connect with other developers using Claude Code. Get help, share feedback, and discuss your projects with the community.
When you use Claude Code, we collect feedback, which includes usage data (such as code acceptance or rejections), associated conversation data, and user feedback submitted via the /bug command.
See our data usage policies.
We have implemented several safeguards to protect your data, including limited retention periods for sensitive information and restricted access to user session data.
For full details, please review our Commercial Terms of Service and Privacy Policy.
