
AI Migrate
https://github.com/block/ai-migrate- Category
- Developer Tools
- Rank
- No. 1105Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- block
- GitHub
- 14 stars
- Date
About
LLM-powered code migration tool from Block, runs large-scale codebase transforms with AI.
What it does
AI Migrate turns before-and-after code examples, written guidance, and a verification script into a repeatable migration workflow. It processes individual files or manifests, keeps each attempt on a Git branch, records pass or failure status, and lets engineers repair failures before merging successful changes.
Why it's ranked here
The design addresses the operational work around automated migration, not just code generation. Parallel workers, verification gates, resumable results, isolated branches, and regression evaluations make repeated transformations manageable. The setup remains hands-on, but that explicit control suits migrations where unchecked model output would be risky.
What's good
Example pairs can represent single files or related file groups, so demonstrations can capture broader transformations. Successful outputs must pass a project-defined check before receiving passing status. Automatic evaluation capture turns completed migrations into regression cases, while generated branches preserve attempts for inspection and repair.
Tradeoffs
Setup requires a cloned repository, Hermit, project examples, migration guidance, and a verification script. Pull-request initialization also depends on GitHub CLI access. Generated prompts, examples, and verification logic still need engineering judgment. Documentation names Python 3.12 among development tools, while package metadata requires Python 3.13 or newer.
How to use it well
Use it for repetitive, repository-wide changes when you can supply representative before-and-after examples and a trustworthy automated check. Start with a small file set, inspect the resulting branches, strengthen evaluations, then increase parallelism. Keep engineers responsible for failed cases and final merges. It does not replace migration design or manual repair.
Technical notes+
pyproject.toml defines a Hatchling-built Python package from src/ai_migrate, with ai-migrate and ai-migrate-eval console scripts. src/ai_migrate/migrate.py builds few-shot conversations from .old and .new pairs, supports model tool calls, runs verification subprocesses, and operates against Git repositories. src/ai_migrate/projects.py schedules file groups through asyncio.TaskGroup with a semaphore, loads optional tools from a project directory, writes per-task logs, and persists result manifests. src/ai_migrate/git.py discovers migration branches and worktrees. src/ai_migrate/run_eval.py executes evaluations in temporary Git workspaces.
Observed
- License
- Apache-2.0
- Primary language
- Python
- Python requirement
- Python 3.13 or newer
- Packaging
- Hatchling build backend producing a wheel from the source package
- Interfaces
- Interactive command-line interface plus a separate evaluation command-line runner
- Installation surface
- Repository clone followed by Hermit environment setup and dependency synchronization
Read from README.md, pyproject.toml, src/ai_migrate/cli.py, src/ai_migrate/git.py, src/ai_migrate/utils.py, src/ai_migrate/context.py, src/ai_migrate/migrate.py, src/ai_migrate/examples.py, src/ai_migrate/manifest.py, src/ai_migrate/pr_utils.py, src/ai_migrate/progress.py, src/ai_migrate/projects.py, src/ai_migrate/run_eval.py, src/ai_migrate/git_identity.py.
What it can do
Migrate code between programming languages
Source code in one programming language → Equivalent code in target programming language
Transform code to use different frameworks
Code using existing framework or library → Code refactored for new framework or library
Modernize legacy codebases
Legacy code with outdated patterns or syntax → Updated code following modern best practices
Convert API implementations
Code using deprecated or old API versions → Code updated to use current API versions
Batch transform multiple files across large codebases
Multiple source code files or entire project directories → Transformed versions of all processed files
Refactor code architecture patterns
Code following one architectural pattern → Code restructured to follow different architectural pattern
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.