Requirements
| Requirement | Version |
|---|---|
| Bun | ≥ 1.1.0 |
| Operating system | macOS, Linux, or Windows (WSL) |
bun:bundle feature-flag system, and faster startup. Install it before proceeding.
Install methods
- npm (recommended)
- Build from source
- npx (no install)
Install the This installs the binary named Verify the install:
claude binary globally from npm:claude to your global bin directory. The package name matches the official Anthropic package (@anthropic-ai/claude-code).The version on npm corresponds to the leaked source at
v0.0.0-leaked. This is not an official release from Anthropic.Verify the installation
Run the version check and diagnostics:/doctor runs src/screens/Doctor.tsx — a full-screen diagnostics UI that checks:
- API connectivity to Anthropic
- Authentication status
- Required tool availability (e.g.,
ripgrepforGrepTool) - Connected MCP servers
- Runtime and platform information
Authentication
Log in after installation:src/services/oauth/) that opens your browser. After completing the flow, credentials are stored locally.
macOS Keychain
On macOS, Claude Code stores authentication tokens in the system Keychain via the keychain prefetch insrc/main.tsx:
Platform notes
macOS
macOS
- Keychain integration is available and used by default for secure credential storage.
- The macOS Keychain read is prefetched in parallel on startup for performance.
- All tools including
BashToolwork without additional configuration.
Linux
Linux
- Credentials are stored in a local config file (no Keychain).
- Ensure
ripgrepis installed forGrepToolto work: node-pty(used for terminal emulation) requires native build tools. Installbuild-essential(Debian) or equivalent.
Windows (WSL)
Windows (WSL)
- Run Claude Code inside a WSL2 environment (Ubuntu or Debian recommended).
- Install Bun inside WSL, not in the Windows host environment.
- Keychain integration is not available; credentials use local config file storage.
- IDE bridge (
src/bridge/) works with VS Code’s WSL extension.
Build scripts reference
Thepackage.json scripts field exposes the following build targets:
| Script | Command | Purpose |
|---|---|---|
build | bun scripts/build-bundle.ts | Development build |
build:watch | bun scripts/build-bundle.ts --watch | Watch mode |
build:prod | bun scripts/build-bundle.ts --minify | Minified production build |
build:web | bun scripts/build-web.ts | Web target build |
typecheck | tsc --noEmit | TypeScript type check |
lint | biome check src/ | Lint with Biome |
check | biome check src/ && tsc --noEmit | Full check |
Entrypoints
Thebin field in package.json maps the claude binary to src/entrypoints/cli.tsx. Additional entrypoints:
| File | Purpose |
|---|---|
src/entrypoints/cli.tsx | Default CLI session — launches the REPL |
src/entrypoints/init.ts | Config, OAuth, telemetry, and MDM initialization |
src/entrypoints/mcp.ts | Run Claude Code as an MCP server |
src/entrypoints/sdk/ | Agent SDK for programmatic use |