
rewrite
Automated mass refactoring of source code.
The Lens
OpenRewrite automates the most tedious job in software maintenance: updating old code. Migrating to a new framework version, swapping out a dead library, patching a known security hole, normally that's a developer grinding through files by hand. OpenRewrite does it for you. You pick a "recipe" (a pre-written set of instructions for a specific change), point it at your codebase, and it rewrites the files while preserving your original formatting, so the diff is reviewable instead of a mess. The engine is Apache 2.0 and free, built by a company called Moderne.
What makes it more reliable than find-and-replace is that it actually understands your code. It parses everything into a type-aware tree, so changes are context-aware, not blind text substitution. You run recipes through first-class Maven and Gradle plugins. Java is by far the deepest and most mature target; Kotlin, JavaScript and TypeScript, Python, and C# are supported but less complete. Running a recipe against a single repository is entirely free and needs no account. The work on your end is picking the right recipe, configuring it, running it, and reviewing what it produced, plus a learning curve if you want to author your own recipes.
The paid layer, Moderne's platform, is about scale: running recipes across hundreds or thousands of repositories at once, with impact analysis and dashboards on top. So the honest split is that the thing that does the refactoring is free, and what you pay for is doing it across an entire organization's fleet with governance. Solo developers and small teams on a handful of repos: the free engine is all you need. Large teams drowning in multi-repo migrations are exactly who Moderne's commercial product targets.
The catch is the gravity toward the paid tier. Single-repo, the free version is genuinely complete. But the moment your problem is organization-wide, the manual multi-repo workflow gets painful fast, which is by design. If you're mostly a Java shop with migration debt, this is a clear win. Outside Java, check that the recipes you need actually exist before counting on it.
Free vs Self-Hosted vs Paid
open coreFree (Apache 2.0): The OpenRewrite engine, the Maven and Gradle plugins, and a large catalog of recipes. You can run any recipe against a single repository, self-hosted, with no account required. There's also a free public Moderne service for open-source projects.
Paid (Moderne Platform): The commercial layer runs recipes in parallel across many repositories at once, with pre-built code models, impact analysis, search, and dashboards. It's about org-wide scale and governance, not unlocking the refactoring itself.
The trade: The refactoring engine is free. You pay Moderne when the job is your entire repo fleet rather than one project at a time.
The refactoring engine and recipes are free for single-repo use. You pay Moderne only for org-wide, multi-repo scale.
Get tools like this every Wednesday
One featured tool, three on the radar. No fluff.
License: Apache License 2.0
Use freely. Patent grant included.
Commercial use: ✓ Yes
About
- Owner
- OpenRewrite (Organization)
- Stars
- 3,535
- Forks
- 527
Explore Further
More tools in the directory
RxJava
RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
48.2k ★jdk
JDK main-line development https://openjdk.org/projects/jdk
23.0k ★airbyte
The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
21.4k ★