Skip to content
CodeMorph

Download CodeMorph (Beta)

Leave your email, then pick your computer. We'll only write about the beta and new releases.

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.

Download CodeMorph (Beta)

Leave your email, then pick your computer. We'll only write about the beta and new releases.

Read the full guide

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

CodeMorphts-migrate
What it isA desktop code editor with a migration engine built inA command-line toolkit of codemod plugins (npm package)
CostFree during the betaFree and open source (MIT)
Needs an AI modelYes: your own provider key, or local models with OllamaNo
Where your code goesOnly to the AI provider you choose. Nothing passes through CodeMorph serversStays on your machine
What you getTypeScript with real types where they can be inferred. Files it cannot type cleanly stay in review instead of being forced through with anyA compiling TypeScript project. The README says to expect lots of // @ts-expect-error and any to fix over time
Order of workLeaf-first batches from your dependency graphNot described in its README
Verificationtsc across the whole project after every batch, with errors sent back for bounded repair attemptsOutput passes the build, by README. Type safety needs follow-up work
ReviewEvery file as a diff you accept or reject, one at a timeCommits after each major step in the full migration script, so you review in git
Going backA checkpoint before any change, and Undo all restores the project byte for byteThrough git, using the commits it makes
Automation and CINo: it is an interactive editorYes: run it from a script
PlatformsWindows and Mac (Apple Silicon and Intel). Linux is plannedAnywhere Node.js runs
MaturityBeta (0.1.x)An established open-source project. Check its repository for current activity
Tests and buildRunning your tests and build from CodeMorph is coming soonNot part of the tool

ts-migrate

What ts-migrate does well

It gets a project compiling

The README describes it as taking a JavaScript, or partial TypeScript, project in and giving a compiling TypeScript project out.

It is free and runs offline

There is no AI model, no key and no account. Your code never leaves your machine.

It is scriptable

It is a command-line tool, so you can run it from a script. The full migration commits after each major step.

It can migrate a subset

You can limit the rename, migrate and reignore steps to part of a project with --sources, and migrate in stages.

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.

Running ts-migrate (from its README)
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

CodeMorph parses your project, resolves every import into a dependency graph and plans leaf-first batches. Files that import nothing local go first, and files in an import cycle move together.

It converts against typed imports

Each file is converted with the already-typed files it imports in context, so the model reads the real shape of an import instead of guessing it.

It type-checks every batch

After each batch, tsc runs across the whole project using your own tsconfig. Errors go back to the model with the exact diagnostics, a bounded number of times, and files that still fail stay in review.

It is reviewable and reversible

Every converted file arrives as a diff you accept or reject. A checkpoint is saved before any change, and Undo all restores the project byte for byte.

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?
ts-migrate is a free command-line tool that gets a project compiling as TypeScript and leaves any and // @ts-expect-error comments for you to fix. CodeMorph is an AI code editor that plans a migration in dependency order, type-checks every batch and lets you review each change and undo the whole run.
Does ts-migrate add any and ts-expect-error?
Yes. Its README says there will be lots of // @ts-expect-error and any that need to be fixed over time. That is how it gets a project to compile quickly.
Is CodeMorph free like ts-migrate?
CodeMorph is free during the beta, but it needs an AI provider key, or local models through Ollama, and the provider bills model usage. ts-migrate needs no model.
Does CodeMorph send my code anywhere?
Your code goes only to the AI provider you choose. Nothing passes through CodeMorph servers. With a local model through Ollama, nothing leaves your computer. ts-migrate uses no AI model, so your code stays on your machine.
Can I use CodeMorph in CI like ts-migrate?
No. CodeMorph is an interactive desktop editor. You can run tsc in CI to keep a migrated codebase type-safe, whichever tool did the conversion.
Which is better for a very large codebase?
It depends on the goal. If you need everything compiling quickly and will tighten types later, ts-migrate is built for that. If you want real types and a checked, reversible run, CodeMorph is built for that, and you can start with one folder.

Try CodeMorph on a copy of one folder.

Download the beta, open a project and see your migration plan in under a minute.

Download CodeMorph (Beta)

Leave your email, then pick your computer. We'll only write about the beta and new releases.

Read the docs

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.