# cc-mirror

CC-MIRROR is a CLI that clones [[claude-code-router|Claude Code]] into isolated *variants*, each with its own provider, model mapping, theme, and config directory. One npx invocation gives you a separate command (`mclaude`, `zai`, `kimi`, `minimax`...) that runs a fully-configured Claude Code variant without touching your main installation.

## What it does

Each variant lives under `~/.cc-mirror/<name>/` and contains its own:

- Native Claude Code install (pinned version, or tracked against the `stable` / `latest` upstream channel)
- API keys, sessions, MCP server config (`config/`)
- Theme patched in via [[toolbox/tweakcc|tweakcc]] (`tweakcc/`)
- Provider prompt pack
- Optional skills (e.g. `dev-browser`)
- `variant.json` metadata

A wrapper binary is dropped in `~/.local/bin` (macOS/Linux) or `~/.cc-mirror/bin` (Windows) so the variant is reachable as a top-level command.

## Provider matrix

Built-in presets, all selectable with `--provider <name>`:

- **Mirror** — vanilla Claude Code, direct Anthropic API, just clean isolation (recommended default)
- **Kimi** — `kimi-for-coding` model via the Kimi Code endpoint
- **MiniMax** — MiniMax-M2.5
- **Z.ai** — GLM-5 / 4.7 / 4.5-Air (project is also sponsored by Z.ai)
- **OpenRouter** — 100+ models via the OpenRouter gateway
- **Vercel** — Vercel AI Gateway
- **Ollama** — local + cloud (Anthropic-compatible endpoint)
- **NanoGPT** — Claude Code-style endpoint
- **CCRouter** — points at a local [[toolbox/claude-code-router|claude-code-router]] instance
- **GatewayZ** — multi-provider gateway
- **custom** — arbitrary `--base-url` + key

Per-variant theming via tweakcc — `kimi` (teal/cyan), `minimax` (coral/red), `zai` (carbon + gold), `openrouter` (silver/chrome + blue), `vercel` (mono + green), `ollama` (sandstone), `nanogpt` (aurora green), `ccrouter` (sky blue), `gatewayz` (violet), `mirror` (defaults).

## Commands

```bash
npx cc-mirror                                 # interactive wizard
npx cc-mirror quick --provider mirror --name mclaude
npx cc-mirror quick --provider zai --api-key "$Z_AI_API_KEY"
npx cc-mirror list
npx cc-mirror update <name> [--claude-version 2.1.37|stable|latest]
npx cc-mirror apply <name>                    # re-apply tweakcc after upgrade
npx cc-mirror remove <name>
npx cc-mirror doctor
npx cc-mirror tweak <name>
mclaude                                       # run the variant
```

`--model-sonnet`, `--model-opus`, `--model-haiku` map the named tier to a provider-specific model string. `stable` and `latest` are upstream Claude Code channels — cc-mirror resolves them to a concrete version at install time and stores it in `variant.json`.

## Where it fits

CC-MIRROR sits in the same "patch Claude Code at install time" niche as [[toolbox/tweakcc|tweakcc]] (which it bundles for theming) and [[toolbox/openwarp|openwarp]] (Warp fork with BYOP providers), but its unit of customisation is the *variant* — multiple cohabiting Claude Codes, each pointed at a different provider. The provider-routing axis it covers is the same axis as [[toolbox/claude-code-router|claude-code-router]], but at the install layer instead of the request layer: cc-mirror gives you `zai` as its own binary; ccr gives you a routing config inside one Claude Code.

For teams that want to A/B providers, or for users running [[toolbox/agent-skills-eval|agent-skills-eval]]-style with-skill / without-skill comparisons across different model backbones, having isolated variants avoids config drift between sessions.

## Limitations

- Variants are pinned to one provider at a time — switching means a new variant or `update --provider`.
- Each variant carries a full Claude Code install (disk cost adds up).
- Tweakcc patches need re-applying after every Claude Code upgrade (`cc-mirror apply <name>`); cc-mirror automates the reapply, but the underlying brittleness is inherited from tweakcc.
- Windows users have to add `%USERPROFILE%\.cc-mirror\bin` to PATH or run the `.cmd` wrapper directly.

Repo: https://github.com/numman-ali/cc-mirror (MIT, 2.2k stars).
