https://github.com/numman-ali/cc-mirror
Create multiple isolated Claude Code variants with custom providers (Z.ai, MiniMax, OpenRouter, LiteLLM)
https://github.com/numman-ali/cc-mirror
Last synced: 18 days ago
JSON representation
Create multiple isolated Claude Code variants with custom providers (Z.ai, MiniMax, OpenRouter, LiteLLM)
- Host: GitHub
- URL: https://github.com/numman-ali/cc-mirror
- Owner: numman-ali
- License: mit
- Created: 2026-01-02T22:28:50.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-02-08T23:22:39.000Z (24 days ago)
- Last Synced: 2026-02-09T02:47:19.574Z (24 days ago)
- Language: TypeScript
- Size: 1.22 MB
- Stars: 1,693
- Watchers: 15
- Forks: 245
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-claude-code - **cc-mirror** - Create multiple isolated Claude Code variants with custom providers (Z.ai, MiniMax, OpenRouter, LiteLLM) (🛠️ Tools & Utilities)
README
# CC-MIRROR
Claude Code, Unshackled
Pre-configured Claude Code variants with custom providers,
prompt packs, and battle-tested enhancements.
One command. Instant power-up.
---
## Quick Start
```bash
# Fastest path to a configured Claude Code variant
npx cc-mirror quick --provider mirror --name mclaude
# Run it
mclaude
```
That's it. You now have a Claude Code variant ready to run.
### Claude Code Version (Stable/Latest/Pin)
By default, CC-MIRROR installs the **latest** Claude Code native release. You can pin a channel or version:
```bash
# Track upstream stable channel
npx cc-mirror quick --provider mirror --name mclaude --claude-version stable
# Track upstream latest channel
npx cc-mirror update mclaude --claude-version latest
# Pin a specific version
npx cc-mirror update mclaude --claude-version 2.1.37
```
Notes:
- `stable` and `latest` are upstream channels. `stable` may lag behind `latest` (that is normal).
- cc-mirror resolves the channel to a concrete version during install/update and stores it in `variant.json`.
### Or use the interactive wizard
```bash
npx cc-mirror
```
---
## What is CC-MIRROR?
CC-MIRROR is an **opinionated Claude Code distribution**. We did the hacking — you get the superpowers.
At its core, CC-MIRROR:
1. **Clones** Claude Code into isolated instances
2. **Configures** provider endpoints, model mapping, and env defaults
3. **Applies** prompt packs and tweakcc themes
4. **Installs** optional skills (dev-browser, opt-in)
5. **Packages** everything into a single command
Each variant is completely isolated — its own config, sessions, MCP servers, and credentials. Your main Claude Code installation stays untouched.
```
┌─────────────────────────────────────────────────────────────────────────┐
│ ~/.cc-mirror/ │
│ │
│ ├── mclaude/ ← Mirror Claude │
│ │ ├── native/ Claude Code installation │
│ │ ├── config/ API keys, sessions, MCP servers │
│ │ ├── tweakcc/ Theme customization │
│ │ └── variant.json Metadata │
│ │ │
│ ├── zai/ ← Z.ai variant (GLM models) │
│ ├── minimax/ ← MiniMax variant (M2.5) │
│ └── kimi/ ← Kimi Code variant (kimi-for-coding) │
│ │
│ Wrappers: /mclaude, /zai, ... │
└─────────────────────────────────────────────────────────────────────────┘
```
Default `` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on Windows.
**Windows tip:** add `%USERPROFILE%\\.cc-mirror\\bin` to your `PATH`, or run the `.cmd` wrapper directly. Each wrapper has a sibling `.mjs` launcher.
---
## Providers
### Mirror Claude (Recommended)
The purest path to vanilla Claude Code. No proxy, no model changes — just clean isolation.
```bash
npx cc-mirror quick --provider mirror --name mclaude
```
- **Direct Anthropic API** — No proxy, authenticate normally (OAuth or API key)
- **Isolated config** — Experiment without affecting your main setup
- **Provider presets** — Clean defaults without hidden patches
### Alternative Providers
Want to use different models? CC-MIRROR supports multiple providers:
| Provider | Models | Auth | Best For |
| -------------- | ---------------------- | ---------- | ------------------------------- |
| **Kimi** | kimi-for-coding | API Key | Long-context coding (Kimi Code) |
| **MiniMax** | MiniMax-M2.5 | API Key | Unified model experience |
| **Z.ai** | GLM-5, 4.7, 4.5-Air | API Key | Heavy coding with GLM reasoning |
| **OpenRouter** | 100+ models | Auth Token | Model flexibility, pay-per-use |
| **Vercel** | Multi-provider gateway | Auth Token | Vercel AI Gateway |
| **Ollama** | Local + cloud models | Auth Token | Local-first + hybrid setups |
| **NanoGPT** | Claude Code endpoint | Auth Token | Simple endpoint setup |
| **CCRouter** | Ollama, DeepSeek, etc. | Optional | Local-first development |
| **GatewayZ** | Multi-provider gateway | Auth Token | Centralized routing |
### Provider Setup Links
| Provider | Subscribe | Get Key/Token | Docs |
| -------------- | ------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| **Kimi** | https://www.kimi.com/code | https://www.kimi.com/code/console | https://www.kimi.com/code/docs/en/more/third-party-agents.html |
| **MiniMax** | https://platform.minimax.io/subscribe/coding-plan | https://platform.minimax.io/user-center/payment/coding-plan | https://platform.minimax.io/docs |
| **Z.ai** | https://z.ai/subscribe | https://z.ai/manage-apikey/apikey-list | https://z.ai/docs |
| **OpenRouter** | https://openrouter.ai/account | https://openrouter.ai/keys | https://openrouter.ai/docs |
| **Vercel** | https://vercel.com/ai | https://vercel.com/account/tokens | https://vercel.com/docs/ai-gateway |
| **Ollama** | https://ollama.com | https://ollama.com | https://docs.ollama.com/api/anthropic-compatibility |
| **NanoGPT** | https://nano-gpt.com | https://nano-gpt.com | https://docs.nano-gpt.com/docs/anthropic-compatibility |
| **CCRouter** | https://github.com/musistudio/claude-code-router#installation | https://github.com/musistudio/claude-code-router#2-configuration | https://github.com/musistudio/claude-code-router#2-configuration |
| **GatewayZ** | https://gatewayz.ai | https://gatewayz.ai | https://docs.gatewayz.ai/docs/anthropic-compatibility |
```bash
# Kimi Code (kimi-for-coding)
npx cc-mirror quick --provider kimi --api-key "$KIMI_API_KEY"
# MiniMax (MiniMax-M2.5)
npx cc-mirror quick --provider minimax --api-key "$MINIMAX_API_KEY"
# Z.ai (GLM-5/4.7/4.5-Air)
npx cc-mirror quick --provider zai --api-key "$Z_AI_API_KEY"
# OpenRouter (100+ models)
npx cc-mirror quick --provider openrouter --api-key "$OPENROUTER_API_KEY" \
--model-sonnet "anthropic/claude-sonnet-4-20250514"
# Vercel AI Gateway
npx cc-mirror quick --provider vercel --api-key "$VERCEL_AI_GATEWAY_KEY" \
--model-sonnet "anthropic/claude-3-5-sonnet-20241022"
# Ollama
npx cc-mirror quick --provider ollama --api-key "ollama" \
--model-sonnet "qwen3-coder" --model-opus "qwen3-coder" --model-haiku "qwen3-coder"
# NanoGPT
npx cc-mirror quick --provider nanogpt --api-key "$NANOGPT_API_KEY"
# CC Router (local LLMs)
npx cc-mirror quick --provider ccrouter
# GatewayZ
npx cc-mirror quick --provider gatewayz --api-key "$GATEWAYZ_API_KEY" \
--model-sonnet "claude-3-5-sonnet-20241022"
```
---
## All Commands
```bash
# Create & manage variants
npx cc-mirror # Interactive TUI
npx cc-mirror quick [options] # Fast setup with defaults
npx cc-mirror create [options] # Full configuration wizard
npx cc-mirror list # List all variants
npx cc-mirror update [name] # Update one or all variants
npx cc-mirror apply # Re-apply tweakcc patches (no reinstall)
npx cc-mirror remove # Delete a variant
npx cc-mirror doctor # Health check all variants
npx cc-mirror tweak # Launch tweakcc customization
# Launch your variant
mclaude # Run Mirror Claude
zai # Run Z.ai variant
minimax # Run MiniMax variant
kimi # Run Kimi Code variant
```
---
## CLI Options
```
--provider kimi | minimax | zai | openrouter | vercel | ollama | nanogpt | ccrouter | mirror | gatewayz | custom
--name Variant name (becomes the CLI command)
--api-key Provider API key
--base-url Custom API endpoint
--model-sonnet Map to sonnet model
--model-opus Map to opus model
--model-haiku Map to haiku model
--brand Theme: auto | kimi | minimax | zai | openrouter | vercel | ollama | nanogpt | ccrouter | mirror | gatewayz
--no-tweak Skip tweakcc theme
--no-prompt-pack Skip provider prompt pack
--verbose Show full tweakcc output during update
```
---
## Brand Themes
Each provider includes a custom color theme via [tweakcc](https://github.com/Piebald-AI/tweakcc):
| Brand | Style |
| -------------- | -------------------------------- |
| **kimi** | Teal/cyan gradient |
| **minimax** | Coral/red/orange spectrum |
| **zai** | Dark carbon with gold accents |
| **openrouter** | Silver/chrome with electric blue |
| **vercel** | Monochrome with green accents |
| **ollama** | Warm sandstone with earthy tones |
| **nanogpt** | Aurora green + cyan accents |
| **ccrouter** | Sky blue accents |
| **gatewayz** | Violet gradients |
---
## Documentation
| Document | Description |
| ----------------------------------------------- | ------------------------------------ |
| [Mirror Claude](docs/features/mirror-claude.md) | Pure Claude Code with clean defaults |
| [Architecture](docs/architecture/overview.md) | How CC-MIRROR works under the hood |
| [Full Documentation](docs/README.md) | Complete documentation index |
---
## Related Projects
- [tweakcc](https://github.com/Piebald-AI/tweakcc) — Theme and customize Claude Code
- [Claude Code Router](https://github.com/musistudio/claude-code-router) — Route Claude Code to any LLM
- [n-skills](https://github.com/numman-ali/n-skills) — Universal skills for AI agents
---
## Contributing
Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup.
**Want to add a provider?** Check the [Provider Guide](docs/TWEAKCC-GUIDE.md).
---
## License
MIT — see [LICENSE](LICENSE)
---
Created by Numman Ali
@nummanali