### Development Setup and Commands (Bash) Source: https://github.com/numman-ali/cc-mirror/blob/main/CONTRIBUTING.md This snippet provides essential bash commands for setting up the development environment for cc-mirror. It includes cloning the repository, installing dependencies, running the application in development mode, executing tests, performing type checking, and bundling for distribution. ```bash git clone https://github.com/numman-ali/cc-mirror.git cd cc-mirror npm install npm run dev -- --help npm run tui npm test npm run typecheck npm run bundle ``` -------------------------------- ### Create Command: Full Configuration Wizard Source: https://context7.com/numman-ali/cc-mirror/llms.txt This section details the `npx cc-mirror create` command for comprehensive variant configuration. It supports interactive setup via prompts or non-interactive setup with all options specified as flags. Examples include setting provider, API keys, model mappings, custom base URLs, and specific Claude Code versions. The `--yes` flag can be used to skip interactive prompts. ```bash # Interactive creation wizard npx cc-mirror create # Non-interactive creation with all options npx cc-mirror create \ --provider openrouter \ --name myvariant \ --api-key "$OPENROUTER_API_KEY" \ --model-sonnet "anthropic/claude-sonnet-4-20250514" \ --model-opus "anthropic/claude-sonnet-4-20250514" \ --model-haiku "anthropic/claude-3-haiku-20240307" \ --brand openrouter \ --yes # Create with custom base URL npx cc-mirror create \ --provider custom \ --name custom-llm \ --base-url "https://my-api.example.com" \ --api-key "$MY_API_KEY" ``` -------------------------------- ### ZAI CLI Usage Examples (Bash) Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Shows available commands and provides practical examples for using the ZAI CLI, including search, read, vision, and repo operations. Requires `Z_AI_API_KEY`. ```bash # Available commands npx zai-cli --help npx zai-cli vision --help npx zai-cli search --help npx zai-cli read --help npx zai-cli repo --help # Examples npx zai-cli search "React 19 new features" --count 5 npx zai-cli read https://docs.example.com/api npx zai-cli vision analyze ./screenshot.png "What errors?" npx zai-cli repo search facebook/react "server components" ``` -------------------------------- ### Quick Start: Create Claude Code Variants Source: https://context7.com/numman-ali/cc-mirror/llms.txt This section demonstrates how to quickly create isolated Claude Code variants using the `npx cc-mirror quick` command. It shows examples for Mirror Claude, Z.ai, MiniMax, and Kimi Code providers, including how to specify API keys. The `--claude-version` flag can be used to select a specific Claude Code version. ```bash # Create a Mirror Claude variant (pure Claude Code experience) npx cc-mirror quick --provider mirror --name mclaude # Run the variant mclaude # Create with Z.ai provider npx cc-mirror quick --provider zai --api-key "$Z_AI_API_KEY" # Create with MiniMax provider npx cc-mirror quick --provider minimax --api-key "$MINIMAX_API_KEY" # Create with Kimi Code provider npx cc-mirror quick --provider kimi --api-key "$KIMI_API_KEY" # Create with specific Claude Code version npx cc-mirror quick --provider mirror --name mclaude --claude-version stable npx cc-mirror quick --provider zai --api-key "$KEY" --claude-version 2.1.37 ``` -------------------------------- ### Install Dependencies Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Installs all necessary project dependencies using npm. This is a standard command for Node.js projects to prepare for development or building. ```bash npm install ``` -------------------------------- ### Interactive CC-MIRROR Setup Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md Running the 'npx cc-mirror' command without any arguments initiates an interactive wizard. This wizard guides the user through the process of setting up a Claude Code variant. ```bash npx cc-mirror ``` -------------------------------- ### Run Development Server Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Starts the development server, allowing you to run the CLI directly from TypeScript sources. This is useful for active development and debugging. ```bash npm run dev ``` -------------------------------- ### Shell Wrapper Script Example (Bash) Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/architecture/overview.md A bash script demonstrating how a cc-mirror variant is exposed as a command-line tool. It sets up environment variables, displays splash art, and executes the main Claude Code binary. ```bash #!/bin/bash # /zai # Show splash art (if TTY and enabled) if [ -t 1 ] && [ "${CC_MIRROR_SPLASH:-1}" != "0" ]; then # ASCII art here... fi # Set Claude Code config directory export CLAUDE_CONFIG_DIR="$HOME/.cc-mirror/zai/config" # Load environment from settings.json # (API keys, base URLs, model mappings) # Run Claude Code exec "$HOME/.cc-mirror/zai/native/claude" "$@" ``` -------------------------------- ### Quick Setup for Kimi Code Provider Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command quickly sets up the CC-Mirror with the Kimi Code provider. It requires your Kimi API key for authentication. The provider 'kimi' and the API key are passed as arguments. ```bash # Kimi Code (kimi-for-coding) npx cc-mirror quick --provider kimi --api-key "$KIMI_API_KEY" ``` -------------------------------- ### CLI Feature Gate Inspection (Bash) Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Demonstrates how to inspect CLI feature gates, including unpacking native installs and checking cached gate configurations using `rg` and `jq`. ```bash # Native installs don't have cli.js on disk. Use tweakcc to unpack first: npx tweakcc unpack /tmp/claude-code.js ~/.cc-mirror//native/claude rg "tengu_prompt_suggestion|promptSuggestionEnabled" /tmp/claude-code.js # Check cached gates cat ~/.cc-mirror//config/.claude.json | jq '.statsig' ``` -------------------------------- ### Quick Setup for NanoGPT Provider Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command configures CC-Mirror to use the NanoGPT provider. It requires your NanoGPT API key for authentication. ```bash # NanoGPT npx cc-mirror quick --provider nanogpt --api-key "$NANOGPT_API_KEY" ``` -------------------------------- ### Mirror Claude Provider Setup Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command configures a CC-MIRROR variant named 'mclaude' using the 'mirror' provider. This is the recommended setup for a direct connection to vanilla Claude Code without any proxy or model changes. ```bash npx cc-mirror quick --provider mirror --name mclaude ``` -------------------------------- ### Quick Setup for MiniMax Provider Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command configures CC-Mirror to use the MiniMax provider. It requires the MiniMax API key for authentication. The provider 'minimax' and the API key are specified. ```bash # MiniMax (MiniMax-M2.5) npx cc-mirror quick --provider minimax --api-key "$MINIMAX_API_KEY" ``` -------------------------------- ### Manual Tweakcc Application (Bash) Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/TWEAKCC-GUIDE.md Commands to manually apply tweakcc patches for a specific cc-mirror variant. It sets environment variables for configuration and installation paths, then executes the tweakcc CLI. Ensure you have the correct variant and tweakcc version. ```bash npx cc-mirror tweak ``` ```bash VARIANT= TWEAKCC_CONFIG_DIR="$HOME/.cc-mirror/$VARIANT/tweakcc" \ TWEAKCC_CC_INSTALLATION_PATH="$HOME/.cc-mirror/$VARIANT/native/claude" \ npx tweakcc@4.0.1 ``` ```bash VARIANT= TWEAKCC_CONFIG_DIR="$HOME/.cc-mirror/$VARIANT/tweakcc" \ TWEAKCC_CC_INSTALLATION_PATH="$HOME/.cc-mirror/$VARIANT/native/claude" \ npx tweakcc@4.0.1 --apply --patches "," ``` -------------------------------- ### Set Custom Context Limit for Claude Code Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/TWEAKCC-GUIDE.md This example demonstrates how to override the default context limit for Claude Code using an environment variable. This is typically used for custom endpoints that support larger context windows. ```bash CLAUDE_CODE_CONTEXT_LIMIT=400000 ``` -------------------------------- ### Quick Setup for CCRouter Provider Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command sets up CC-Mirror with CCRouter for local LLM development. It does not require an API key and is suitable for local-first development environments. ```bash # CC Router (local LLMs) npx cc-mirror quick --provider ccrouter ``` -------------------------------- ### Providers API: Get and List Provider Templates (TypeScript) Source: https://context7.com/numman-ali/cc-mirror/llms.txt Demonstrates how to use the `getProvider` and `listProviders` functions from the `cc-mirror/providers` module to access and list available AI provider templates. It also shows how to build environment variables for a specific provider using `buildEnv`. Dependencies include the `cc-mirror/providers` module. ```typescript import { getProvider, listProviders, buildEnv } from 'cc-mirror/providers'; // Get specific provider template const zaiProvider = getProvider('zai'); console.log('Label:', zaiProvider.label); console.log('Base URL:', zaiProvider.baseUrl); console.log('Auth Mode:', zaiProvider.authMode); // List all available providers (excludes experimental by default) const providers = listProviders(); for (const p of providers) { console.log(`${p.key}: ${p.description}`); } // Include experimental providers const allProviders = listProviders(true); // Build environment variables for a provider const env = buildEnv({ providerKey: 'zai', apiKey: process.env.Z_AI_API_KEY, modelOverrides: { sonnet: 'glm-4.7', opus: 'glm-5' } }); console.log('Environment:', env); ``` -------------------------------- ### Mirror Claude Variant Structure Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/features/mirror-claude.md An overview of the directory structure for a Mirror Claude variant installation. It shows the locations for the native Claude Code installation, configuration files (settings.json, .claude.json), theme configuration (tweakcc/config.json), and variant metadata. ```text ┌─────────────────────────────────────────────────────────┐ │ ~/.cc-mirror/mclaude/ │ │ ├── native/ Claude Code installation │ │ ├── config/ │ │ │ ├── settings.json Minimal env (splash only) │ │ │ ├── .claude.json MCP servers, approvals │ │ ├── tweakcc/ │ │ │ └── config.json Mirror theme config │ │ └── variant.json Variant metadata │ │ │ │ Wrapper: /mclaude │ └─────────────────────────────────────────────────────────┘ Default `` is `~/.local/bin` on macOS/Linux and `~/.cc-mirror/bin` on Windows. **Windows tip:** add `%USERPROFILE%.cc-mirrorin` to `PATH` (wrapper is `.cmd` with a sibling `.mjs` launcher). ``` -------------------------------- ### Quick Setup for Z.ai Provider Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command enables CC-Mirror to use Z.ai models. It requires your Z.ai API key. The provider is set to 'zai' and the API key is provided. ```bash # Z.ai (GLM-5/4.7/4.5-Air) npx cc-mirror quick --provider zai --api-key "$Z_AI_API_KEY" ``` -------------------------------- ### Quick Setup for OpenRouter Provider Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command sets up CC-Mirror with OpenRouter, allowing access to over 100 models. It requires an OpenRouter API key and allows specifying a model for the 'sonnet' role. ```bash # OpenRouter (100+ models) npx cc-mirror quick --provider openrouter --api-key "$OPENROUTER_API_KEY" \ --model-sonnet "anthropic/claude-sonnet-4-20250514" ``` -------------------------------- ### Launch Terminal User Interface (TUI) Source: https://context7.com/numman-ali/cc-mirror/llms.txt This section explains how to launch the interactive Terminal User Interface (TUI) for CC-MIRROR. The TUI provides a guided experience for variant creation and management. It can be launched by default when no arguments are provided to `npx cc-mirror` or explicitly using the `--tui` flag. ```bash # Launch TUI (default when no arguments provided) npx cc-mirror # Explicitly launch TUI npx cc-mirror --tui ``` -------------------------------- ### Quick Setup for Ollama Provider Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command sets up CC-Mirror with Ollama for local or cloud models. It uses 'ollama' as a placeholder API key and allows specifying models for 'sonnet', 'opus', and 'haiku' roles. ```bash # Ollama npx cc-mirror quick --provider ollama --api-key "ollama" \ --model-sonnet "qwen3-coder" --model-opus "qwen3-coder" --model-haiku "qwen3-coder" ``` -------------------------------- ### Quick Setup for GatewayZ Provider Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command configures CC-Mirror to use the GatewayZ multi-provider gateway. It requires your GatewayZ API key and allows specifying a model for the 'sonnet' role. ```bash # GatewayZ npx cc-mirror quick --provider gatewayz --api-key "$GATEWAYZ_API_KEY" \ --model-sonnet "claude-3-5-sonnet-20241022" ``` -------------------------------- ### Quick Start CC-MIRROR Configuration Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command quickly sets up a Claude Code variant named 'mclaude' using the 'mirror' provider. After execution, the 'mclaude' command becomes available to run the configured variant. ```bash npx cc-mirror quick --provider mirror --name mclaude # Run it mclaude ``` -------------------------------- ### List Command: Show All Variants Source: https://context7.com/numman-ali/cc-mirror/llms.txt This section describes the `npx cc-mirror list` command for displaying installed Claude Code variants. It supports basic listing of names, detailed output with full information, and JSON output for scripting purposes. The JSON output includes details like name, provider, version, and file paths. ```bash # List variant names npx cc-mirror list # List with full details (name, provider, version, wrapper path) npx cc-mirror list --full # Output as JSON for scripting npx cc-mirror list --json # Example JSON output: # [ # { # "name": "mclaude", # "provider": "mirror", # "claudeVersion": "2.1.37", # "wrapperPath": "/home/user/.local/bin/mclaude", # "binaryPath": "/home/user/.cc-mirror/mclaude/native/claude", # "configDir": "/home/user/.cc-mirror/mclaude/config", # "createdAt": "2024-01-15T10:30:00.000Z" # } # ] ``` -------------------------------- ### Configure Input Box and Miscellaneous UX Settings Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/TWEAKCC-GUIDE.md This snippet shows how to configure the input box and other miscellaneous user experience settings within cc-mirror. It allows for customization like removing the input border and controlling the visibility of startup banners and patch information. ```json { "inputBox": { "removeBorder": true }, "misc": { "showPatchesApplied": true, "hideStartupBanner": false, "hideStartupClawd": false, "expandThinkingBlocks": true, "hideCtrlGToEdit": true } } ``` -------------------------------- ### Quick Setup for Vercel AI Gateway Source: https://github.com/numman-ali/cc-mirror/blob/main/README.md This command configures CC-Mirror to use the Vercel AI Gateway. It requires your Vercel AI Gateway key and allows specifying a model for the 'sonnet' role. ```bash # Vercel AI Gateway npx cc-mirror quick --provider vercel --api-key "$VERCEL_AI_GATEWAY_KEY" \ --model-sonnet "anthropic/claude-3-5-sonnet-20241022" ``` -------------------------------- ### Theme Design Configuration (JSON) Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/TWEAKCC-GUIDE.md An example JSON snippet for configuring a custom theme in tweakcc. This defines color properties to establish a brand identity for a specific Claude Code variant, focusing on readability and visual consistency. ```json { "name": "MiniMax Pulse", "id": "minimax-pulse", "colors": { "claude": "rgb(255,77,77)", "claudeShimmer": "rgb(255,140,140)", "background": "rgb(245,245,245)", "text": "rgb(17,17,17)", "promptBorder": "rgb(229,209,255)", "userMessageBackground": "rgb(255,235,240)" } } ``` -------------------------------- ### Configure OpenRouter Provider Source: https://context7.com/numman-ali/cc-mirror/llms.txt Sets up a 'quick' variant using the OpenRouter provider, mapping specific models (sonnet, opus, haiku) to their corresponding identifiers. Requires an OpenRouter API key. ```bash # Create OpenRouter variant with model mapping npx cc-mirror quick \ --provider openrouter \ --name openrouter \ --api-key "$OPENROUTER_API_KEY" \ --model-sonnet "anthropic/claude-sonnet-4-20250514" \ --model-opus "anthropic/claude-sonnet-4-20250514" \ --model-haiku "anthropic/claude-3-haiku-20240307" # Run OpenRouter variant openrouter ``` -------------------------------- ### Run Multiple Mirror Claude Instances Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/features/mirror-claude.md Bash commands demonstrating how to create and run multiple, distinct Mirror Claude instances, such as for work and personal accounts. It shows how to assign different names and run them with separate API keys. ```bash # Work account npx cc-mirror create --provider mirror --name work-claude # Personal account npx cc-mirror create --provider mirror --name personal-claude # Run each with different API keys ANTHROPIC_API_KEY="$WORK_KEY" work-claude ANTHROPIC_API_KEY="$PERSONAL_KEY" personal-claude ``` -------------------------------- ### Launch Tweakcc Customization UI Source: https://context7.com/numman-ali/cc-mirror/llms.txt Opens the interactive tweakcc UI for a specific variant, allowing users to customize its appearance and behavior. ```bash # Launch tweakcc UI for a variant npx cc-mirror tweak mclaude ``` -------------------------------- ### Health Check Command (Bash) Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Executes a health check for the CC Mirror installation using the `npx cc-mirror doctor` command. ```bash npx cc-mirror doctor ``` -------------------------------- ### Bundle Project Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Builds the project into a distributable format, typically a single JavaScript file (e.g., dist/cc-mirror.mjs). This command is used for creating production-ready builds. ```bash npm run bundle ``` -------------------------------- ### Variant Creation Command (Bash) Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Illustrates the command to create a new variant for the ZAI provider, specifying the provider, name, and API key. ```bash npm run dev -- create --provider zai --name test-zai --api-key ``` -------------------------------- ### List and Remove Variants (listVariants, removeVariant) Source: https://context7.com/numman-ali/cc-mirror/llms.txt Provides examples for programmatically listing all configured variants and removing a specific variant using `listVariants` and `removeVariant` functions from `cc-mirror/core`. ```typescript import { listVariants, removeVariant } from 'cc-mirror/core'; // List all variants const variants = listVariants('~/.cc-mirror'); for (const entry of variants) { console.log(`${entry.name}: ${entry.meta?.provider ?? 'unknown'}`); } // Remove a variant removeVariant('~/.cc-mirror', 'old-variant'); console.log('Variant removed'); ``` -------------------------------- ### Create and Run Mirror Claude Variant (Bash) Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/features/mirror-claude.md This snippet demonstrates how to create a Mirror Claude variant using `cc-mirror` and then run it. Authentication is handled through the normal Claude flow, either via OAuth or by setting the ANTHROPIC_API_KEY environment variable. ```bash # Create a Mirror Claude variant npx cc-mirror create --provider mirror --name mclaude # Run it - authenticate via normal Claude flow mclaude ``` -------------------------------- ### CLI Options for CC-Mirror Variant Management (Bash) Source: https://context7.com/numman-ali/cc-mirror/llms.txt A reference for all command-line interface options available in CC-Mirror for creating and managing AI model variants. These options cover provider selection, authentication, API configuration, model mapping, versioning, theming, features, paths, environment variables, and operational modes. ```bash # Provider and identity --provider # kimi | minimax | zai | openrouter | vercel | ollama | nanogpt | ccrouter | mirror | gatewayz | custom --name # Variant name (becomes the CLI command) # Authentication --api-key # Provider API key --auth-token # Auth token (for authToken providers) # API configuration --base-url # Custom API endpoint # Model mapping --model-sonnet # Map to sonnet model --model-opus # Map to opus model --model-haiku # Map to haiku model # Versioning --claude-version # stable | latest | x.y.z # Theming --brand # auto | none | kimi | minimax | zai | openrouter | vercel | ollama | nanogpt | ccrouter | mirror | gatewayz --no-tweak # Skip tweakcc theme application # Features --no-prompt-pack # Skip provider prompt pack --shell-env # Write API key to shell profile --no-shell-env # Skip shell profile integration --skill-install # Install optional skills --no-skill-install # Skip skill installation --skill-update # Update installed skills # Paths --root # Variants root directory (default: ~/.cc-mirror) --bin-dir # Wrapper install directory (default: ~/.local/bin) # Environment --env KEY=VALUE # Extra environment variables (can be repeated) # Modes --yes # Non-interactive mode --quick # Quick setup with minimal prompts --tui # Force TUI mode --no-tui # Force CLI mode # Output --verbose # Show full tweakcc output --json # Output as JSON (list, doctor commands) --full # Show full details (list command) # Doctor-specific --live # Run live functionality tests --timeout-ms # Live test timeout (default: 20000) --include-mirror # Include mirror variants in live test --prompt # Custom prompt for live test ``` -------------------------------- ### Launch TUI Wizard Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Launches the Text-based User Interface (TUI) wizard for the project. This command is used to interact with the application through a terminal-based interface. ```bash npm run tui ``` -------------------------------- ### Configuration File Inspection (Bash) Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Provides bash commands to inspect various configuration files for a given variant, including general settings, TweakCC configurations, and wrapper scripts. ```bash # Variant config cat ~/.cc-mirror//config/settings.json cat ~/.cc-mirror//config/.claude.json cat ~/.cc-mirror//variant.json # TweakCC config cat ~/.cc-mirror//tweakcc/config.json # Wrapper script cat / ``` -------------------------------- ### Testing Commands (Bash) Source: https://github.com/numman-ali/cc-mirror/blob/main/CONTRIBUTING.md This snippet shows how to run tests within the cc-mirror project using npm. It covers running all tests and running a specific test file. ```bash npm test npm test -- test/core.test.ts ``` -------------------------------- ### Run Tests Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Executes all the automated tests for the project. This includes unit, integration, and end-to-end tests to ensure code quality and stability. ```bash npm test ``` -------------------------------- ### Update Command: Update Variants Source: https://context7.com/numman-ali/cc-mirror/llms.txt This section covers the `npx cc-mirror update` command for updating Claude Code variants. It allows updating all variants or specific ones, refreshing the Claude Code installation, reapplying themes, and updating configurations. Options include specifying a new Claude Code version, performing a settings-only update, updating model mappings, and enabling verbose output. ```bash # Update all variants npx cc-mirror update # Update specific variant npx cc-mirror update mclaude # Update with new Claude Code version npx cc-mirror update mclaude --claude-version latest # Settings-only update (skip Claude Code reinstall) npx cc-mirror update mclaude --settings-only # Update with new model mappings npx cc-mirror update myvariant \ --model-sonnet "new-model-name" \ --model-haiku "fast-model-name" # Update with verbose tweakcc output npx cc-mirror update mclaude --verbose ``` -------------------------------- ### Combine Mirror with Shell Environment Integration Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/features/mirror-claude.md Bash command to create a Mirror Claude instance with shell environment integration. This is useful for automatically loading environment variables or configurations into your shell profile. ```bash # Mirror with shell env integration (for Zsh/Bash profile) npx cc-mirror create --provider mirror --name mclaude --shell-env ``` -------------------------------- ### Provider Comparison Table Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/features/mirror-claude.md A comparison table outlining features of different LLM providers including zai/minimax, kimi, openrouter, ollama, and mirror. It highlights model availability, authentication modes, base URL support, model mappings, prompt pack usage, and configuration isolation. ```text ┌─────────────────────────────────────────────────────────────────────────────────────────┐ │ │ │ Feature │ zai/minimax │ kimi │ openrouter │ ollama │ mirror │ │ ───────────────────┼────────────┼──────────┼────────────┼──────────┼─────────────────│ │ Model │ GLM / M2.5 │ K2.5 │ You choose │ Local │ Claude (native) │ │ Auth Mode │ API Key │ API Key │ Auth Token │ Auth Tok │ OAuth or Key │ │ ANTHROPIC_BASE_URL │ ✓ Set │ ✓ Set │ ✓ Set │ ✓ Set │ ✗ Not set │ │ Model Mappings │ ✓ Auto │ ✓ Auto │ ✓ Required │ Required │ ✗ Not set │ │ Prompt Pack │ ✓ Minimal │ ✗ │ ✗ │ ✗ │ ✗ Pure │ │ Config Isolation │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ │ │ │ │ Also available: Vercel, NanoGPT, GatewayZ (auth token), CC Router (optional auth) │ │ │ └─────────────────────────────────────────────────────────────────────────────────────────┘ ``` -------------------------------- ### Minimax Blocked Tools Configuration (TypeScript) Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Specifies tools that are blocked for the Minimax provider, directing users to use alternative Minimax-specific commands. ```typescript export const MINIMAX_BLOCKED_TOOLS = [ 'WebSearch', // Use mcp__MiniMax__web_search ]; ``` -------------------------------- ### Configure Vercel AI Gateway Provider Source: https://context7.com/numman-ali/cc-mirror/llms.txt Sets up a variant using the Vercel AI Gateway provider, enabling access to models through Vercel's infrastructure. Requires a Vercel AI Gateway API key and specifies model mappings. ```bash # Create Vercel variant npx cc-mirror quick \ --provider vercel \ --api-key "$VERCEL_AI_GATEWAY_KEY" \ --model-sonnet "anthropic/claude-3-5-sonnet-20241022" # The variant name defaults to "ccvercel" ccvercel ``` -------------------------------- ### Run cc-mirror Doctor with Live Test Source: https://context7.com/numman-ali/cc-mirror/llms.txt Executes the 'doctor' command with live testing enabled to check the status of mirror variants. This requires authentication to access live environments. ```bash npx cc-mirror doctor --live --include-mirror ``` -------------------------------- ### ZAI Blocked Tools Configuration (TypeScript) Source: https://github.com/numman-ali/cc-mirror/blob/main/AGENTS.md Defines a list of tools that are blocked for the ZAI provider. These are typically server-injected or intended to be replaced by ZAI-specific CLI commands. ```typescript export const ZAI_BLOCKED_TOOLS = [ 'mcp__4_5v_mcp__analyze_image', // Server-injected 'mcp__milk_tea_server__claim_milk_tea_coupon', 'mcp__web_reader__webReader', 'WebSearch', // Use zai-cli search 'WebFetch', // Use zai-cli read ]; ``` -------------------------------- ### Mirror Claude Authentication: OAuth Source: https://github.com/numman-ali/cc-mirror/blob/main/docs/features/mirror-claude.md Instructions for authenticating with Mirror Claude using the OAuth flow. This method typically involves running the 'mclaude' command and following an on-screen prompt to sign in. ```bash mclaude # Follow the OAuth prompt to sign in ``` -------------------------------- ### Programmatic Variant Creation (createVariant) Source: https://context7.com/numman-ali/cc-mirror/llms.txt Demonstrates synchronous and asynchronous creation of AI model variants using the `createVariant` and `createVariantAsync` functions from the `cc-mirror/core` module. Allows detailed configuration including provider, API keys, model overrides, and progress callbacks. ```typescript import { createVariant, createVariantAsync } from 'cc-mirror/core'; // Synchronous creation const result = createVariant({ name: 'my-variant', providerKey: 'zai', apiKey: process.env.Z_AI_API_KEY, brand: 'zai', rootDir: '~/.cc-mirror', binDir: '~/.local/bin', claudeVersion: 'latest', modelOverrides: { sonnet: 'glm-4.7', opus: 'glm-5', haiku: 'glm-4.5-air' }, noTweak: false, promptPack: true, shellEnv: true }); console.log('Created:', result.meta.name); console.log('Wrapper:', result.wrapperPath); // Async creation with progress callback const asyncResult = await createVariantAsync({ name: 'async-variant', providerKey: 'openrouter', apiKey: process.env.OPENROUTER_API_KEY, onProgress: (step) => console.log('Progress:', step) }); ```