███╗ ██╗███████╗██████╗ ██╗ ██╗ ██████╗ ██████╗ ██████╗ ███████╗
████╗ ██║██╔════╝██╔══██╗██║ ██║ ██╔════╝██╔═══██╗██╔══██╗██╔════╝
██╔██╗ ██║█████╗ ██████╔╝██║ ██║ ██║ ██║ ██║██║ ██║█████╗
██║╚██╗██║██╔══╝ ██╔══██╗╚██╗ ██╔╝ ██║ ██║ ██║██║ ██║██╔══╝
██║ ╚████║███████╗██║ ██║ ╚████╔╝ ╚██████╗╚██████╔╝██████╔╝███████╗
╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝
God's in his heaven. All's right with the world.
NERV-CODE is a NERV/MAGI-themed restoration of the Claude Code CLI (v2.1.88), reconstructed from the public npm package's sourcemap. The full TypeScript source has been extracted, themed with Neon Genesis Evangelion aesthetics, and can be compiled and run as a fully functional AI coding assistant.
This is a research & fan project — all functionality comes from the original Claude Code; we only added the NERV paint job.
In the spirit of open source community etiquette, we gratefully acknowledge:
This project stands on the shoulders of giants:
- zxdxjtu/claude-code-sourcemap — Original sourcemap extraction and source restoration methodology
- ChinaSiro/claude-code-sourcemap — Build system, documentation, and community contributions
- Claude Code source code is copyright Anthropic, PBC. This project is reconstructed from publicly available npm packages for research and educational purposes only. Not for commercial use.
- Neon Genesis Evangelion (新世紀エヴァンゲリオン) is created by Hideaki Anno / Studio Gainax / khara, Inc. All NERV/MAGI/EVA references in this project are a fan tribute for entertainment purposes only (新世纪福音战士致敬仅供娱乐). No affiliation with or endorsement by the rights holders.
- Node.js >= 18
- Bun >= 1.0 (build only)
- An Anthropic API key (for actual Claude conversations)
bash install.shThe script will install dependencies, restore internal SDKs, build the project, and create a nerv command in ~/.local/bin/.
# 1. Install dependencies (推荐 bun,项目构建脚本依赖 bun)
bun install
# 如果使用 npm,必须加 --legacy-peer-deps:
# npm install --legacy-peer-deps
# 原因:项目使用 react@19.3.0-canary,npm 的 semver 严格模式
# 认为 canary 预发布版本不满足 react-compiler-runtime 的
# peerDependency "^19",会报依赖冲突。bun 无此问题。
# 2. Restore Anthropic internal SDKs (from sourcemap)
cp -r node_modules_sourcemap/@anthropic-ai/bedrock-sdk node_modules/@anthropic-ai/
cp -r node_modules_sourcemap/@anthropic-ai/vertex-sdk node_modules/@anthropic-ai/
cp -r node_modules_sourcemap/@anthropic-ai/foundry-sdk node_modules/@anthropic-ai/
# 3. Build
bun run build.ts# Version check
node dist/cli.js --version # → 2.1.88 (NERV CODE)
# Help
node dist/cli.js --help
# Interactive mode (must be in a real terminal — TTY required)
node dist/cli.js
# Pipe mode (requires API key)
ANTHROPIC_API_KEY=sk-ant-xxx node dist/cli.js -p 'hello'Note: Interactive mode requires a real terminal (Terminal.app, iTerm2, etc.). IDE integrated terminals may not work due to TTY detection. Set
CLAUDE_CODE_FORCE_INTERACTIVE=1to force interactive mode.
┌─────────────────────────────────────────────────────────┐
│ NERV CODE CLI │
│ src/entrypoints/cli.tsx │
├─────────────────────────────────────────────────────────┤
│ MELCHIOR-1 BALTHASAR-2 CASPER-3 │
│ ┌─────────────┐ ┌──────────────┐ ┌────────────┐ │
│ │ Conversation │ │ Tools │ │ Services │ │
│ │ Engine │ │ (45 tools) │ │ │ │
│ │ │ │ │ │ API │ │
│ │ query.ts │◄──►│ BashTool │ │ MCP │ │
│ │ QueryEngine │ │ FileEdit │ │ Compact │ │
│ │ │ │ AgentTool │ │ Hooks │ │
│ │ │ │ MCPTool │ │ Auth │ │
│ │ │ │ ... │ │ ... │ │
│ └─────────────┘ └──────────────┘ └────────────┘ │
├─────────────────────────────────────────────────────────┤
│ Terminal Dogma │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────┐ │
│ │ REPL UI │ │ Permissions │ │ Settings │ │
│ │ (React/Ink) │ │ (6 modes) │ │ (5 levels) │ │
│ └─────────────┘ └──────────────┘ └───────────────┘ │
└─────────────────────────────────────────────────────────┘
| Module | Path | Role |
|---|---|---|
| Bootstrap | src/main.tsx |
CLI init, command routing |
| Conversation Engine | src/query.ts + src/QueryEngine.ts |
Stateful async generator, streaming SSE |
| Tools | src/tools/ (45 tools) |
BashTool, FileEdit, AgentTool, MCPTool, etc. |
| Commands | src/commands/ (80+ commands) |
CLI commands (commit, review, config, etc.) |
| Components | src/components/ |
React (Ink) TUI components |
| Services | src/services/ |
API client, MCP, context compression |
| Constants | src/constants/ |
NERV-themed prompts, spinner verbs, figures |
Three agent types with EVA-inspired isolation levels:
| Type | Isolation | EVA Analogy |
|---|---|---|
| SubAgent | Full context isolation | Separate Entry Plug |
| Fork | Shared prompt cache | Dummy Plug System |
| Teammate | Independent process, file mailbox | Multi-EVA Sortie |
All modifications are cosmetic only — no behavioral changes to Claude.
| Token | Hex | Usage |
|---|---|---|
nerv-red |
#B7282E |
Primary brand, logo, accents |
nerv-red-light |
#D4494F |
Hover states, shimmer |
terminal-black |
#0A0A0C |
Primary background |
text-primary |
#E8E6E3 |
Main body text |
eva-purple |
#6B3FA0 |
Agent accent (Unit-01) |
eva-orange |
#E87D2A |
Agent accent (Unit-00) |
All diamond icons (◇/◆) replaced with hexagons (⬡/⬢), referencing AT Field geometry and MAGI's hexagonal display panels.
MAGI Analyzing... Pattern Blue Scanning... AT Field Calculating...
CASPER Processing... BALTHASAR Evaluating... MELCHIOR Reasoning...
Terminal Dogma Accessing... Entry Plug Connecting... S2 Engine Initializing...
Dead Sea Scrolls Parsing... SEELE Protocol Decrypting... Eva Cage Preparing...
Custom NERV emblem with fig leaf silhouette, rendered in NERV red. Greeting:
God's in his heaven. All's right with the world.
| Phase | Version | Codename | Status | Description |
|---|---|---|---|---|
| 序 | 1.0.0 | You Are (Not) Alone | CURRENT | Initial open-source release. Source restoration + NERV theming. |
| 破 | 2.0.0 | You Can (Not) Advance | Planned | Extended theming (error screens, permission prompts, lifecycle messages). Plugin system. |
| Q | 3.0.0 | You Can (Not) Redo | Planned | Major refactoring. Custom MAGI consensus mode for multi-agent. |
| 終 | 3.0+1.0 | Thrice Upon a Time | Planned | Feature-complete. Stable release. Full NERV integration. |
NERV-CODE/
├── src/ # TypeScript source (1,884 files)
│ ├── entrypoints/cli.tsx # CLI entry point
│ ├── main.tsx # Bootstrap & command routing
│ ├── tools/ # 45 tool implementations
│ ├── commands/ # 80+ CLI commands
│ ├── services/ # API, MCP, compression, etc.
│ ├── components/ # React (Ink) TUI components
│ ├── constants/ # NERV-themed prompts & verbs
│ └── utils/ # Git, model, auth, settings
├── shims/ # Build-time module shims
├── docs/ # Documentation
├── .github/ # Issue & PR templates
├── build.ts # Bun bundler configuration
├── install.sh # One-click install script
├── package.json # Dependencies (84+)
└── tsconfig.json # TypeScript configuration
Uses Bun Bundler to compile TypeScript into a single ESM bundle via 4 custom plugins:
| Plugin | Purpose |
|---|---|
bun-bundle-shim |
Converts compile-time feature() to runtime Set.has() (78 feature flags) |
react-compiler-runtime |
Redirects react/compiler-runtime to npm package |
native-stubs |
Stubs 8 internal/native packages to empty modules |
text-loader |
Imports .md/.txt files as string exports |
See docs/BUILD.md for detailed build documentation.
Important: The original Claude Code source is copyright Anthropic, PBC. EVA/NERV references are a fan tribute — see LICENSE for full notices.
NERV — God's in his heaven. All's right with the world.
⬡ MELCHIOR-1: APPROVE ⬡ BALTHASAR-2: APPROVE ⬡ CASPER-3: APPROVE ⬡