Hi everyone,
I built an open-source macOS developer tool called Claude Code on OpenRouter.
GitHub repo: https://github.com/allytag/Claude_Code
It lets the official Claude Code CLI run through OpenRouter models while keeping the normal Claude Code workflow: tools, file editing, bash, MCP, repository work, and agent behavior.
The main reason I built it is that many custom model setups break Claude Code features or make cost and model control harder. This setup keeps Claude Code itself untouched and adds a local Anthropic-compatible proxy for OpenRouter.
What it does:
- Runs the official Claude Code CLI through OpenRouter
- Keeps Claude Code tools, file edits, bash, repo workflow, and MCP working
- Uses a local proxy at 127.0.0.1:4141
- Supports model roles like main, cheapFull, hard, subagent, lowToken, backup, and compare
- Lets users switch OpenRouter models without reinstalling
- Adds cache markers and provider pinning where supported
- Strips reasoning fields by default to avoid hidden token cost
- Includes a safe updater with snapshot, validation, and rollback
- Includes doctor, status, cleanup, verify, uninstall, and rollback commands
- Avoids storing API keys in the repo
Current requirements:
- macOS Apple Silicon
- Node.js 20 or newer
- Zsh
- Official Claude Code CLI
- OpenRouter API key
Quick start:
- Install official Claude Code if missing:
curl -fsSL https://claude.ai/install.sh | bash
- Clone the repo:
git clone https://github.com/allytag/Claude_Code.git Claude cd Claude
- Preview the install:
./install.sh --dry-run
- Install:
./install.sh --merge
- Start using it:
claude claude-router status
Useful commands:
claude-router status claude-router list claude-router tail claude-router use main deepseek-v4-pro claude-router add grok x-ai/grok-4 --name "Grok 4" claude-low "explain debounce" claude-safe-update latest --dry-run claude-safe-update latest ./verify.sh
Safety details:
- The installer has dry-run mode before writing changes
- Existing Claude settings are preserved in merge mode
- Backups are created before changes
- Claude Desktop is detected but not modified
- The OpenRouter API key is written only to local Claude settings
- The repo includes a redaction check to block accidental secret commits
- Uninstall and restore-last-backup commands are included
This is currently macOS Apple Silicon only. Linux and Windows are not supported yet because the installer uses macOS-specific paths and LaunchAgent behavior.
I would appreciate feedback from other macOS developers who use AI coding tools. In particular:
- Does this install cleanly on your Apple Silicon Mac?
- Are there edge cases with Claude Code tools, MCP, or VS Code integration?
- Are there better defaults for model roles or safer update behavior?
- Is there anything I should change before calling this more stable?
Repo again: https://github.com/allytag/Claude_Code
Thanks.