This is the fully deobfuscated and reorganized version of Claude Code CLI v1.0.115, extracted from the original webpack bundle.
claude-code-organized/
├── src/
│ ├── main.js # Main entry point
│ ├── auth/ # Authentication modules
│ │ ├── oauth.js # OAuth flow implementation
│ │ └── api-key.js # API key management
│ ├── tools/ # Tool implementations
│ │ ├── bash.js # Bash command execution
│ │ ├── write.js # File writing
│ │ ├── edit.js # File editing
│ │ └── read.js # File reading
│ ├── ui/ # Terminal UI components
│ │ ├── terminal.js # Main terminal interface
│ │ └── components/
│ │ └── spinner.js # Loading indicators
│ ├── conversation/ # Conversation handling
│ │ └── loop.js # Main conversation loop
│ ├── network/ # (To be added)
│ │ ├── client.js # HTTP client
│ │ └── streaming.js # SSE streaming
│ ├── filesystem/ # (To be added)
│ │ └── permissions.js # File permission management
│ ├── mcp/ # (To be added)
│ │ └── server.js # MCP server connections
│ ├── hooks/ # (To be added)
│ │ └── manager.js # Hook system
│ ├── config/ # (To be added)
│ │ └── settings.js # Configuration management
│ └── utils/ # Utility modules
│ └── circular-buffer.js # Circular buffer for output
├── package.json # Package configuration
└── README.md # This file
# Install dependencies
npm install
# Make executable
chmod +x src/main.js
# Create symlink (optional)
npm link# OAuth login (recommended)
claude login
# API key login
claude login --api-key
# Logout
claude logout# Start conversation
claude
# Check status
claude status
# Specify model
claude -m claude-3-opus-20240229- OAuth Flow: Full PKCE-based OAuth implementation for Claude.ai
- API Key: Support for Anthropic API keys with validation
- Bash: Execute shell commands with timeout and background support
- Write: Create and overwrite files with safety checks
- Edit: Find and replace text in files
- Read: Read files with support for text, images, PDFs, and notebooks
- Terminal Interface: React-based terminal UI using Ink
- Components: Spinners, progress bars, activity indicators
- Loop: Main conversation processing with tool execution
- Token Management: Track and manage token usage
- Microcompaction: Automatic conversation compression
# API Key
export ANTHROPIC_API_KEY="sk-ant-api..."
# Custom base URL (optional)
export ANTHROPIC_BASE_URL="https://api.anthropic.com"
# Proxy settings (optional)
export HTTP_PROXY="http://proxy:8080"
export HTTPS_PROXY="http://proxy:8080"- ✅ Full conversation loop with streaming
- ✅ Tool system (Bash, File operations)
- ✅ OAuth and API key authentication
- ✅ Terminal UI with React/Ink
- ✅ Token usage tracking
- ✅ Auto-compaction for long conversations
- ✅ Background task execution
- ✅ File permission management
- ✅ Multi-edit operations
- ✅ Progress indicators
- ✅ Error handling and recovery
- ⏳ MCP server connections
- ⏳ Hook system for extensions
- ⏳ Web search and fetch tools
- ⏳ Full configuration management
- ⏳ Installation and update system
This code was extracted from a webpack-bundled and heavily obfuscated JavaScript file containing 50,360 lines. The deobfuscation process involved:
- Variable Renaming: Restored meaningful names for ~10,000+ mangled variables
- Function Extraction: Identified and separated ~500+ functions
- Module Reconstruction: Rebuilt the original module structure
- Type Recovery: Inferred types and interfaces from usage patterns
- Flow Analysis: Traced control flow through complex async operations
- Work in Progress: Not all features have been extracted yet
- Dependencies: Some dependencies may be missing or need updating
- Testing: Extensive testing is needed before production use
- Security: Review authentication and file operations before deployment
This is a deobfuscation project for educational and transparency purposes. The original Claude Code is property of Anthropic.
This deobfuscated version is provided for educational purposes. The original Claude Code is subject to Anthropic's terms of service.
Note: This is a reconstructed version from obfuscated code. Some implementation details may differ from the original source.