# Claude Code 2.1.88

> Modified build of Claude Code v2.1.88 — Claude's official CLI, rebuilt from source with custom branding.

**Disclaimer**: The original source code is the intellectual property of **Anthropic and Claude**. This repository is provided strictly for technical research, study, and educational exchange. **Commercial use is strictly prohibited.**

---
![Mohammed Code](assets/logo.png)
---
## Features

- Full AI coding assistant in your terminal
- 40+ built-in tools (file read/write, bash, search, web fetch, etc.)
- Multi-agent support (sub-agents, worktrees)
- MCP (Model Context Protocol) integration
- Plugin system
- Session persistence and resume

## Quick Start

```bash
# 1. Install dependencies
npm install

# 2. Build from source
node scripts/build.mjs

# 3. Run with your API key
ANTHROPIC_API_KEY=your-key node dist/cli.js
```

For detailed instructions, see [QUICKSTART.md](QUICKSTART.md).

## Customization

This is a full source build — you can modify anything:

| Want to change... | Edit this file |
|------------------|---------------|
| App name / branding | `src/components/LogoV2/LogoV2.tsx` |
| Welcome message | `src/components/LogoV2/WelcomeV2.tsx` |
| AI personality | `src/constants/system.ts` |
| Tool descriptions | `src/constants/tools.ts` |
| Colors / theme | `src/utils/settings/` |
| Permission prompts | `src/components/permissions/` |
| Input prompt style | `src/components/PromptInput/` |

After any change, rebuild:
```bash
node scripts/build.mjs
```

See [QUICKSTART.md](QUICKSTART.md) for full customization guide.

## Project Structure

```
├── src/                  # Source code (edit this)
│   ├── main.tsx          # Entry point
│   ├── query.ts          # Main AI agent loop
│   ├── components/       # React/Ink terminal UI
│   ├── tools/            # 40+ tool implementations
│   ├── commands/         # Slash commands
│   ├── constants/        # System prompts & configs
│   ├── services/         # API client, MCP, analytics
│   └── utils/            # Utilities
├── scripts/
│   └── build.mjs        # Build script
├── dist/
│   └── cli.js            # Built output (~27MB)
├── docs/                 # Analysis reports (EN/ZH)
└── package.json
```

## How the Build Works

The original Claude Code is built with **Bun** using compile-time intrinsics (`feature()`, `MACRO`, `bun:bundle`). This project uses **esbuild** as a best-effort replacement:

1. **Transform**: `feature('FLAG')` → `false`, `MACRO.VERSION` → `'2.1.88'`
2. **Stubs**: Auto-generates stubs for 108 missing internal modules (feature-gated, dead-code-eliminated in the original build)
3. **Bundle**: esbuild bundles everything into a single ESM file
4. **Patch**: Replaces esbuild's `__require` shim with Node.js `createRequire` for CJS interop

The build produces a self-contained `dist/cli.js` that only requires Node.js >= 18.

## Requirements

- Node.js >= 18
- npm >= 9
- An Anthropic API key or compatible endpoint

## License

Original source code is copyright **Anthropic and Claude**. This repository is for technical research and education only. See the original npm package `@anthropic-ai/claude-code` for full license terms.
