Contributing to cc-mirror

May 29, 2026 · View on GitHub

Thanks for your interest in contributing!

Contribution Policy

cc-mirror is currently maintained as issues-first. External pull requests are not accepted or merged because provider compatibility, binary patching, and release safety need to be implemented directly by the maintainer.

Please open an issue instead with the problem, provider docs, reproduction steps, expected behavior, and any patch notes or branch links you want considered as reference.

Development Setup

# Clone the repo
git clone https://github.com/numman-ali/cc-mirror.git
cd cc-mirror

# Install dependencies
npm install

# Run in development mode
npm run dev -- --help
npm run tui

# Run tests
npm test

# Type check
npm run typecheck

# Bundle for distribution
npm run bundle

Project Structure

src/
├── cli/           # CLI entry point and argument parsing
├── core/          # Core logic (create, update, remove variants)
├── tui/           # Interactive TUI (ink/React)
│   ├── screens/   # Screen components
│   └── components/# Reusable UI components
├── brands/        # Provider theme presets
└── providers/     # Provider templates (zai, minimax, etc.)

test/              # Tests (node:test)
scripts/           # Build scripts

Adding a New Provider

  1. Add the provider template in src/providers/index.ts
  2. Add a brand preset in src/brands/ (optional)
  3. Update help text in src/cli/help.ts
  4. Add tests in test/

Code Style

  • TypeScript with strict mode
  • ESM modules
  • Functional style preferred
  • No emojis in code/output unless user requests

Testing

# Run all tests
npm test

# Run specific test file
npm test -- test/core.test.ts

Commits

Use conventional commits:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • refactor: Code refactoring
  • test: Tests
  • chore: Maintenance

Pull Requests

External pull requests may be closed automatically. If you already have code, link it from an issue so it can be reviewed as reference material.

Questions?

Open an issue or reach out on Twitter @nummanali.