Comparison
CodeMorph vs ts-migrate: which should you use to migrate JavaScript to TypeScript?
ts-migrate is a free command-line tool from Airbnb that gets a project compiling as TypeScript quickly. CodeMorph is an AI code editor that plans a migration in dependency order and checks every batch. This page compares them as fairly as we can, including where CodeMorph falls short.
Windows 10/11 · Free during beta · Bring your own Claude key or use Ollama
Windows may show 'unknown publisher'. Click More info, then Run anyway.
The short answer
- Choose ts-migrate when you want a free, scriptable, offline tool that gets a large codebase compiling fast, and you accept that it leaves any and // @ts-expect-error comments to clean up afterwards.
- Choose CodeMorph when you want real types from the start, every batch type-checked, every change reviewable and the whole run reversible, and you are fine using an AI model and a desktop editor.
ts-migrate facts on this page come from its README at github.com/airbnb/ts-migrate. We say when something is not documented there rather than guess.
Side by side
CodeMorph vs ts-migrate at a glance
| CodeMorph | ts-migrate | |
|---|---|---|
| What it is | A desktop code editor with a migration engine built in | A command-line toolkit of codemod plugins (npm package) |
| Cost | Free during the beta | Free and open source (MIT) |
| Needs an AI model | Yes: your own provider key, or local models with Ollama | No |
| Where your code goes | Only to the AI provider you choose. Nothing passes through CodeMorph servers | Stays on your machine |
| What you get | TypeScript with real types where they can be inferred. Files it cannot type cleanly stay in review instead of being forced through with any | A compiling TypeScript project. The README says to expect lots of // @ts-expect-error and any to fix over time |
| Order of work | Leaf-first batches from your dependency graph | Not described in its README |
| Verification | tsc across the whole project after every batch, with errors sent back for bounded repair attempts | Output passes the build, by README. Type safety needs follow-up work |
| Review | Every file as a diff you accept or reject, one at a time | Commits after each major step in the full migration script, so you review in git |
| Going back | A checkpoint before any change, and Undo all restores the project byte for byte | Through git, using the commits it makes |
| Automation and CI | No: it is an interactive editor | Yes: run it from a script |
| Platforms | Windows and Mac (Apple Silicon and Intel). Linux is planned | Anywhere Node.js runs |
| Maturity | Beta (0.1.x) | An established open-source project. Check its repository for current activity |
| Tests and build | Running your tests and build from CodeMorph is coming soon | Not part of the tool |
ts-migrate
What ts-migrate does well
It gets a project compiling
It is free and runs offline
It is scriptable
It can migrate a subset
Where ts-migrate stops
ts-migrate is honest about its trade-off. Its README says: "There will be lots of // @ts-expect-error, and any that will need to be fixed over time." And: "The resulting code will pass the build, but a followup is required to improve type safety."
That is a reasonable deal for a huge codebase where compiling quickly is the goal. It does mean the types you get on day one are mostly placeholders, and the work of making them real comes after.
npm install --save-dev ts-migrate
npx -p ts-migrate -c "ts-migrate-full src"CodeMorph
What CodeMorph does differently
It plans by dependency order
It converts against typed imports
It type-checks every batch
It is reviewable and reversible
Where CodeMorph falls short today
- It is a beta (0.1.x) for Windows and Mac. There is no Linux build yet.
- It needs an AI provider key, or local models through Ollama, so it is not a free offline codemod. Your code goes to the provider you choose.
- It is an interactive desktop editor, not a command you can run in CI or from a script.
- Verify type-checks your project today. Running your tests and build from inside CodeMorph is coming soon, so run them yourself after each batch.
- The type-check proves the types are consistent. It does not prove behavior is unchanged.
Choosing
Which one should you choose?
Choose ts-migrate if
- Your codebase is very large and you mainly need it compiling as TypeScript soon.
- You want a free, open-source tool with no AI model and no data leaving your machine.
- You want to script the migration, or run it in CI-style automation.
- You are happy to pay down the any types and @ts-expect-error comments afterwards.
Choose CodeMorph if
- You want real types from the start, with the compiler checking every batch.
- You want to review each change as a diff and be able to undo the whole run.
- You are comfortable using an AI provider key, or running a local model with Ollama.
- You are on Windows or a Mac and are happy working in a desktop editor.
The two tools are not designed to work together, and neither is right for every project. If you are unsure, try both on a copy of one folder and compare the diffs.
How to migrate JavaScript to TypeScript (2026 guide)Best tools to migrate JavaScript to TypeScript
CodeMorph vs ts-migrate: questions
What is the difference between CodeMorph and ts-migrate?
Does ts-migrate add any and ts-expect-error?
Is CodeMorph free like ts-migrate?
Does CodeMorph send my code anywhere?
Can I use CodeMorph in CI like ts-migrate?
Which is better for a very large codebase?
Try CodeMorph on a copy of one folder.
Download the beta, open a project and see your migration plan in under a minute.
Windows 10/11 · Free during beta · Bring your own Claude key or use Ollama
Windows may show 'unknown publisher'. Click More info, then Run anyway.