Freedom251 › Code Refactoring Tools
OpenRewrite
What OpenRewrite is
OpenRewrite is a free, open-source ecosystem for automating code refactoring and reducing technical debt. It applies named recipes to code represented as Lossless Semantic Trees, then prints modified trees back into source for review. Recipes can address framework migrations, security fixes and stylistic consistency, and can be authored in YAML, Refaster templates or Java. Maven and Gradle plugins run recipes locally as part of a build, one repository at a time; the Maven plugin also offers a dry-run that reports proposed changes and writes diff files. No Maven recipe runs unless activated by name. Documented languages are Java, Kotlin and Groovy, with data formats including HCL, JSON, Properties, Protobuf, TOML, XML and YAML. Named framework coverage includes Spring, Quarkus and Micronaut, and the recipe index lists 4,183 recipes across modules. The core framework and language libraries use Apache License 2.0, though some recipes carry source-available or proprietary licenses. Artifacts are distributed through an authenticated repository, and some recipes require a Moderne subscription.
Who it suits
It suits developers and teams updating code repositories with repeatable migrations, security changes or style adjustments. Its build plugins are for one repository at a time, and users should account for authenticated artifact access and recipe-specific licensing.
What it does well
- Maven and Gradle plugins run recipes locally
- Dry-run reports changes and creates diff files
- Supports Java, Kotlin and Groovy
- Recipes cover migrations, security fixes and style
What to know first
- Runs recipes against one repository at a time
- Artifacts require repository authentication
- Some recipes require a Moderne subscription
- Some recipes use non-Apache licensing
Limits
The free OpenRewrite core plan covers the core framework and Apache-licensed recipes and runs on one repository at a time. Some source-available or proprietary recipes require a Moderne subscription; artifacts are distributed through an authenticated repository.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| OpenRewrite core | Core framework and Apache-licensed recipes; runs one repository at a time | Free |
As openrewrite.org lists them, read 5 Oct 2026. The maker's own page has the final word.
Getting started
- Visit the OpenRewrite website.
- Use the Maven or Gradle plugin in a repository.
- Access the Code Genome Project repository for OpenRewrite artifacts; authentication is required.
- Activate a recipe by name in the Maven plugin or run recipes through the build plugin.
- Use the Maven dry-run goal to review proposed changes and diff files.
OpenRewrite is a recipe-driven refactoring toolkit for teams maintaining Java, Kotlin, or Groovy code in Maven or Gradle repositories. It is most useful when migrations, security updates, or style changes must be repeatable and reviewable. The free core is compelling for repository-level work, but authenticated artifact access, mixed recipe licenses, and single-repository execution narrow its fit for larger programs.
Overview
OpenRewrite converts source into Lossless Semantic Trees, applies a recipe, and prints the changed tree back as source code. That structure-aware approach is better suited to broad, consistent edits than search-and-replace, particularly for framework migrations, security fixes, and stylistic cleanup. Java remains the original focus, while the project is expanding its language and framework coverage.
The recipe index contains 4,183 recipes across modules. Named framework coverage includes Spring, Quarkus, and Micronaut. Teams can write recipes as declarative YAML, Refaster templates, or imperative Java, so the system can support both ready-made maintenance and organization-specific transformations.
Key features
- Maven and Gradle integration: Plugins run recipes within a build, making refactoring part of an existing engineering workflow rather than a separate desktop process. Local execution does not connect to Moderne or OpenRewrite, except when retrieving artifacts from configured repositories.
- Review before applying: Maven's dry-run goal identifies recipes that would change files and writes diff files in each module's target directory. That gives reviewers a concrete checkpoint before source files are altered.
- Explicit recipe activation: Maven runs no recipe until one is activated by name. This avoids accidental broad changes, but it also puts selection and configuration responsibility on the team.
- Broad source support: The project documents Java, Kotlin, and Groovy, plus HCL, JSON, Properties, Protobuf, TOML, XML, and YAML formats. This is useful for changes that span code and configuration, although language and framework depth is not uniform.
- IDE and community help: IntelliJ IDEA 2024.1 or later has built-in OpenRewrite support, with the OpenRewrite IntelliJ plugin recommended. A free self-paced introductory course and Slack or Discord communities provide entry points for learning and troubleshooting.
- AST-based, batch refactoring: Core analysis is AST-based and supports batch changes within a repository. OpenRewrite itself processes one repository at a time; coordinated multi-repository execution belongs to Moderne.
Pricing
OpenRewrite core — free. This includes the core framework and Apache-licensed recipes, with execution limited to one repository at a time. It is the right starting point for individuals and teams that can work within Maven or Gradle and need open-source, repository-level automation.
The core software is open source, but “free” does not mean every recipe is unrestricted. Core framework and language libraries use Apache License 2.0, while some recipes are source-available or proprietary. Artifacts are distributed through the Code Genome Project repository, which requires authentication, and some source-available or proprietary recipes require a Moderne subscription. Source-available terms allow companies to apply that software to their own code but restrict commercialization or providing it to others as a managed service. Open-source projects may use Apache-licensed and Moderne Source Available recipes through the plugins or Moderne CLI without a license for those repositories.
Platforms
OpenRewrite is listed for Linux and self-hosted deployment. Maven and Gradle plugins fit build environments, and IntelliJ IDEA 2024.1 or later adds editor integration. The plugins operate locally, subject to configured artifact repositories, which suits organizations that keep source processing inside their own build infrastructure.
Who it's for
Choose OpenRewrite when your team needs repeatable migrations or maintenance across a Java-, Kotlin-, or Groovy-based repository and wants proposed changes represented as diffs before adoption. It is particularly suitable for Spring, Quarkus, or Micronaut projects and for groups willing to author or tailor recipes.
Look elsewhere when the requirement is coordinated change across many repositories, because the standalone tooling handles one repository at a time. Teams that need a fully permissive license for every recipe, or that cannot authenticate to the artifact repository, should also evaluate alternatives before committing.
Pros and cons
Pros
- Free core: The framework and Apache-licensed recipe set cost nothing, lowering the barrier to automated modernization.
- Reviewable workflow: Maven dry runs and generated diffs let teams inspect proposed edits before applying them.
- Large recipe catalog: 4,183 recipes and named support for major JVM frameworks provide substantial starting coverage.
- Build-native operation: Maven and Gradle plugins keep refactoring close to established build and CI processes.
Cons
- One-repository scope: Fleet-wide coordination requires Moderne rather than the standalone project.
- License variation: Some recipes are source-available or proprietary, with commercial and managed-service restrictions.
- Authenticated access: Code Genome Project distribution requires repository authentication, and selected recipes require a Moderne subscription.
- Activation overhead: No Maven recipe runs until explicitly named, so teams must manage recipe selection carefully.
Alternatives
Code Refactoring Tools is the broader category guide for comparing refactoring products. ast-grep is a free option spanning API, extensions, Linux, macOS, web, and Windows. CodeRush offers free commercial use with the same features and updates across its free and paid subscriptions. ReSharper suits users wanting a freemium extension with a non-commercial free plan and paid commercial edition. Roslynator provides free tools and extensions with donations welcomed. Coccinelle is a free Linux and macOS choice. CodART is MIT-licensed, though SciTools Understand needs a separate professional license. Sourcery offers a free open-source plan for public repositories with AI reviews, summaries, diagrams, one-click fixes, and custom rules. Spoon is free and open source with no paid plans or usage limits stated.
Verdict
OpenRewrite is a strong recommendation for JVM teams that want build-integrated, AST-based migrations and can review changes repository by repository. Its free core, dry-run diffs, and extensive recipe catalog are the main reasons to choose it. Look elsewhere if you need multi-repository orchestration, universally permissive recipe licensing, or an artifact workflow that does not require authentication.
Verdict
OpenRewrite offers a recipe-based way to make code changes within Maven or Gradle builds, with dry-run review available through Maven. Its one-repository scope and varying recipe access and licenses are important constraints.
Questions
How much does OpenRewrite cost?
The OpenRewrite core plan is free. It covers the core framework and Apache-licensed recipes.
Which languages does OpenRewrite support?
Documented language support includes Java, Kotlin, and Groovy. Data formats include HCL, JSON, Properties, Protobuf, TOML, XML, and YAML.
Can it run locally?
Yes. Its Maven and Gradle plugins run locally as part of a build, aside from access to configured artifact repositories.
Does it support multiple repositories at once?
OpenRewrite runs a recipe against one repository at a time. Moderne provides multi-repository execution.
Is all of OpenRewrite Apache-licensed?
The core framework and language libraries use Apache License 2.0. Some recipes have source-available or proprietary licenses.
Facts from OpenRewrite's own pages
- Access limitation
- OpenRewrite artifacts are distributed through the Code Genome Project repository, which requires authentication; some source-available and proprietary recipes require a Moderne subscription. · docs.openrewrite.org, 4 Oct 2026
- Build integrations
- The project provides Maven and Gradle plugins for running recipes on one repository at a time. · docs.openrewrite.org, 5 Oct 2026
- Build tools
- OpenRewrite provides Maven and Gradle plugins for running recipes as part of a build. · docs.openrewrite.org, 4 Oct 2026
- Company
- Moderne's press kit lists Miami, Florida as its headquarters and says OpenRewrite originated as a project Jonathan Schneider started at Netflix. · moderne.ai, 5 Oct 2026
- Framework coverage
- The documentation names Spring, Quarkus, and Micronaut among supported frameworks. · docs.openrewrite.org, 4 Oct 2026
- How it works
- Recipes modify Lossless Semantic Trees and print the modified trees back to source code while honoring original formatting. · docs.openrewrite.org, 5 Oct 2026
- Integration
- The recipe development guide says IntelliJ IDEA 2024.1 or later has built-in OpenRewrite support and recommends enabling the OpenRewrite IntelliJ plugin. · docs.openrewrite.org, 4 Oct 2026
- Integrations
- The Moderne platform page describes native GitHub, GitLab, and Bitbucket integrations for coordinated pull requests. · moderne.ai, 5 Oct 2026
- Languages
- The OpenRewrite project describes Java as its original focus and says language and framework coverage is expanding. · docs.openrewrite.org, 5 Oct 2026
- Learning and support
- The documentation points users to a free self-paced introductory course and offers community help through Slack or Discord. · docs.openrewrite.org, 4 Oct 2026
- Licensing
- The core framework is Apache licensed, while some recipe modules use the Moderne Source Available License or a proprietary license. · docs.openrewrite.org, 5 Oct 2026
- Local execution
- The Maven and Gradle plugins run locally without connecting to Moderne or OpenRewrite, aside from accessing configured artifact repositories. · docs.openrewrite.org, 4 Oct 2026
- Open source usage
- Open source projects can use Apache-licensed and Moderne Source Available recipes through the OpenRewrite Maven and Gradle plugins or Moderne CLI without a license for those repositories. · docs.openrewrite.org, 5 Oct 2026
- Purpose
- OpenRewrite is an open-source automated refactoring ecosystem for eliminating technical debt in code repositories. · docs.openrewrite.org, 5 Oct 2026
- Recipe activation
- The Maven plugin runs no recipe unless it is explicitly activated by name. · docs.openrewrite.org, 4 Oct 2026
- Recipe catalog
- The recipe index lists 4,183 recipes across modules. · docs.openrewrite.org, 4 Oct 2026
- Recipe formats
- Recipes can be authored as declarative YAML, Refaster templates, or imperative Java. · moderne.ai, 5 Oct 2026
- Recipes
- Recipes automate framework migrations, security fixes, and stylistic consistency tasks. · docs.openrewrite.org, 5 Oct 2026
- Recipe uses
- Recipes support framework migrations, security fixes, and stylistic consistency tasks. · docs.openrewrite.org, 4 Oct 2026
- Review before applying
- The Maven plugin offers a dry-run goal that reports recipes that would make changes and writes diff files in module target folders. · docs.openrewrite.org, 4 Oct 2026
- Scale limit
- OpenRewrite by itself runs a recipe against one repository at a time; Moderne provides multi-repository execution. · moderne.ai, 5 Oct 2026
- Security
- Moderne's press kit states that Moderne is SOC 2 Type 2 compliant. · moderne.ai, 5 Oct 2026
- Source available limits
- Source available software may not be commercialized or provided to others as a managed service, though companies may apply it to their own code. · docs.openrewrite.org, 5 Oct 2026
- Support
- The OpenRewrite documentation invites users to ask questions in Slack or Discord and lists [email protected]. · docs.openrewrite.org, 5 Oct 2026
Where OpenRewrite stands on Freedom251
- Code Refactoring Tools#12 of 22