Skip to content

androidZzT/ai-coding-migrate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-coding-migrate

Seamlessly migrate configurations between AI coding tools

One command to move your setup between Claude Code, Codex CLI, Gemini CLI, Cursor, Qwen Code, and more

PyPI version Python License: MIT GitHub stars

Quick Start | Supported Tools | Usage | Architecture | Contributing | 中文文档


Why ai-coding-migrate?

Switching AI coding tools shouldn't mean rebuilding your configuration from scratch. Each tool has its own format for instructions, agents, skills, hooks, and rules. ai-coding-migrate converts between them automatically.

Quick Start

# Recommended: pipx (isolated environment)
pipx install ai-coding-migrate

# Or use uv
uv tool install ai-coding-migrate

# One-shot run (no install needed)
uvx ai-coding-migrate migrate --from claude --to codex
# Migrate Claude Code config to Codex CLI
ai-coding-migrate migrate --from claude --to codex --project .

# Preview what would be created (dry run)
ai-coding-migrate migrate --from claude --to codex --dry-run

Supported Tools

Migration Matrix

Source \ Target Codex CLI Gemini CLI Cursor Qwen Code Trae
Claude Code Yes Yes Yes Yes Soon
Codex CLI Yes Yes Yes Yes Soon
Gemini CLI Yes Yes Yes Yes Soon
Cursor Yes Yes Yes Yes Soon
Qwen Code Yes Yes Yes Yes Soon
Trae Soon Soon Soon Soon Soon

Configuration Mapping

Concept Claude Code Codex CLI Gemini CLI Cursor Qwen Code
Instructions CLAUDE.md AGENTS.md GEMINI.md .cursorrules QWEN.md
Agents .claude/agents/*.md .codex/config.toml [agents.*] .gemini/agents/*.md .cursor/rules/*.mdc * --
Skills .claude/skills/*/SKILL.md .agents/skills/*/SKILL.md -- .cursor/rules/*.mdc * .qwen/skills/*/SKILL.md
Settings .claude/settings.json .codex/config.toml .gemini/settings.json -- .qwen/settings.json
Hooks .claude/settings.json .codex/hooks.json -- -- --
Rules -- -- -- .cursor/rules/*.mdc --

* Cursor has no agents/skills concept. Agents and skills are downgraded to .mdc rule files during migration.

Usage

# Basic migration
ai-coding-migrate migrate --from claude --to codex --project .

# Specify a different output directory
ai-coding-migrate migrate --from claude --to gemini --output ./migrated

# Dry run: see what files would be created
ai-coding-migrate migrate --from cursor --to codex --dry-run

# Cross-tool migration
ai-coding-migrate migrate --from codex --to gemini --project ./my-project

# Include Claude memory files when migrating from Claude
ai-coding-migrate migrate --from claude --to gemini --include-claude-memory

# List all supported tools
ai-coding-migrate list

Claude Memory Migration (Optional)

When using --from claude, you can pass --include-claude-memory to append Claude memory content into the target instruction file.

Included sources:

  • ~/.claude/CLAUDE.md (global memory)
  • <project>/CLAUDE.local.md (project-local memory)
  • ~/.claude/projects/<encoded-project-path>/memory/*.md (auto memory)

Common Migration Scenarios

Trying Codex CLI while keeping Claude Code setup:

ai-coding-migrate migrate --from claude --to codex --output ./codex-config

Moving a team from Cursor to Claude Code (manual step):

# Export Cursor rules to Codex format first
ai-coding-migrate migrate --from cursor --to codex --project .

Syncing config across multiple tools:

ai-coding-migrate migrate --from claude --to codex --output .
ai-coding-migrate migrate --from claude --to gemini --output .

Architecture

┌─────────────┐     ┌────────────────────────┐     ┌──────────────┐
│   Reader     │     │   Intermediate         │     │   Writer     │
│              │     │   Representation (IR)  │     │              │
│  Claude      │────>│                        │────>│  Codex       │
│  Codex       │     │  ProjectConfig         │     │  Gemini      │
│  Gemini      │     │    .instructions       │     │  Cursor      │
│  Cursor      │     │    .agents             │     │  Qwen        │
│  Qwen        │     │    .skills             │     │  Trae (soon) │
│  Trae (soon) │     │    .settings           │     │              │
│              │     │    .hooks              │     │              │
└─────────────┘     │    .rules              │     └──────────────┘
                    └────────────────────────┘

N tools require only 2N adapters (N readers + N writers) instead of N x N converters.

All data classes are frozen (immutable) — no mutation, safe to pass around.

Development

# Clone and install
git clone https://github.com/androidZzT/ai-coding-migrate.git
cd ai-coding-migrate
pip install -e ".[dev]"

# Run tests
python3 -m pytest tests/ -v

# Run with coverage
python3 -m pytest tests/ --cov=ai_coding_bridge --cov-report=term-missing

Project Structure

src/ai_coding_bridge/
├── ir.py              # Frozen dataclasses (IR)
├── cli.py             # CLI entry point (argparse)
├── converter.py       # Read → IR → Write orchestrator
├── utils.py           # Frontmatter parser, file I/O
├── readers/           # Source tool readers (→ IR)
│   ├── claude.py
│   ├── codex.py
│   ├── gemini.py
│   ├── cursor.py
│   ├── qwen.py
│   └── trae.py
└── writers/           # Target tool writers (IR →)
    ├── codex.py
    ├── gemini.py
    ├── cursor.py
    ├── qwen.py
    └── trae.py

Contributing

Contributions are welcome! To add support for a new tool:

  1. Create a reader in src/ai_coding_bridge/readers/
  2. Create a writer in src/ai_coding_bridge/writers/
  3. Register both in their respective __init__.py
  4. Add test fixtures and tests
  5. Update the migration matrix in this README

License

MIT

About

Universal config migration between AI coding tools — Claude Code, Codex CLI, Gemini CLI, Cursor, Qwen Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages