EVERYTHING XIAOMI
Get listed

OpenRewrite

OpenRewrite is an open-source automated refactoring ecosystem for updating code and reducing technical debt.

Place
#7 of 22
Score
6.3

What OpenRewrite is

OpenRewrite is an open-source automated refactoring ecosystem for updating code and reducing technical debt. It applies named recipes to code represented as Lossless Semantic Trees, then prints the changed trees back to source for review. Recipes cover framework migrations, security fixes, and style consistency, and can be written as declarative YAML, Refaster templates, or imperative Java. Maven and Gradle plugins run recipes as part of a build, locally and one repository at a time. The Maven plugin includes a dry-run goal that reports proposed changes and writes diff files; no recipe runs unless explicitly activated by name. Documented language support includes Java, Kotlin, and Groovy, alongside formats such as JSON, XML, YAML, and HCL. The recipe index lists 4,183 recipes across modules. Core and language libraries use Apache License 2.0, though some recipes have source-available or proprietary licenses. Artifacts are distributed through an authenticated repository, and certain recipes require a Moderne subscription.

Good

  • Maven and Gradle plugins run recipes in builds
  • Dry-run reports proposed changes and writes diffs
  • Recipes cover migrations, security, and style
  • Supports Java, Kotlin, and Groovy
  • Free introductory course and community help are listed

Watch out

  • Runs against one repository at a time
  • Artifact repository requires authentication
  • Some recipes require a Moderne subscription
  • Some recipes have restricted or proprietary licenses

Who it suits

OpenRewrite suits developers maintaining repositories who want recipe-based migrations, security updates, or style changes through Maven or Gradle. It is most directly suited to work that can be handled one repository at a time.

Verdict

OpenRewrite provides a local, recipe-driven approach to refactoring with a review step before applying changes. Check artifact access and recipe licensing, since availability and terms vary.

Plans and prices

From OpenRewrite's own pricing page, checked 5 Oct 2026.

All about pricing
PlanPriceWhat it gives you
OpenRewrite coreFreeCore framework and Apache-licensed recipes; runs one repository at a time

The facts

Each one read from OpenRewrite's own pages, with the date it was checked.

What it does

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.checked 4 Oct 2026
Build integrations
The project provides Maven and Gradle plugins for running recipes on one repository at a time.checked 5 Oct 2026
Build tools
OpenRewrite provides Maven and Gradle plugins for running recipes as part of a build.checked 4 Oct 2026
Framework coverage
The documentation names Spring, Quarkus, and Micronaut among supported frameworks.checked 4 Oct 2026
How it works
Recipes modify Lossless Semantic Trees and print the modified trees back to source code while honoring original formatting.checked 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.checked 4 Oct 2026
Integrations
The Moderne platform page describes native GitHub, GitLab, and Bitbucket integrations for coordinated pull requests.checked 5 Oct 2026
Languages
The OpenRewrite project describes Java as its original focus and says language and framework coverage is expanding.checked 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.checked 4 Oct 2026
Licensing
The core framework is Apache licensed, while some recipe modules use the Moderne Source Available License or a proprietary license.checked 5 Oct 2026
Local execution
The Maven and Gradle plugins run locally without connecting to Moderne or OpenRewrite, aside from accessing configured artifact repositories.checked 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.checked 5 Oct 2026
Purpose
OpenRewrite is an open-source automated refactoring ecosystem for eliminating technical debt in code repositories.checked 5 Oct 2026
Recipe activation
The Maven plugin runs no recipe unless it is explicitly activated by name.checked 4 Oct 2026
Recipe catalog
The recipe index lists 4,183 recipes across modules.checked 4 Oct 2026
Recipe formats
Recipes can be authored as declarative YAML, Refaster templates, or imperative Java.checked 5 Oct 2026
Recipes
Recipes automate framework migrations, security fixes, and stylistic consistency tasks.checked 5 Oct 2026
Recipe uses
Recipes support framework migrations, security fixes, and stylistic consistency tasks.checked 4 Oct 2026
Scale limit
OpenRewrite by itself runs a recipe against one repository at a time; Moderne provides multi-repository execution.checked 5 Oct 2026
Security
Moderne's press kit states that Moderne is SOC 2 Type 2 compliant.checked 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.checked 5 Oct 2026
Support
The OpenRewrite documentation invites users to ask questions in Slack or Discord and lists [email protected].checked 5 Oct 2026

The company

Company
Moderne's press kit lists Miami, Florida as its headquarters and says OpenRewrite originated as a project Jonathan Schneider started at Netflix.checked 5 Oct 2026

Where it runs

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.checked 4 Oct 2026
The full review of OpenRewrite

OpenRewrite is an open-source, recipe-driven system for automated code refactoring. It is best suited to teams maintaining Java, Kotlin, or Groovy repositories that want build-integrated migrations and reviewable diffs. The free core is compelling for repository-level modernization, but authenticated artifact access, mixed recipe licensing, and one-repository-at-a-time execution narrow its fit for larger programs.

Overview

OpenRewrite converts source into Lossless Semantic Trees, applies a recipe, and prints the changed tree back to source code. That model supports repeatable framework migrations, security remediation, and stylistic cleanup without reducing the work to unreviewed text replacement. Java was the original focus, while language and framework coverage continues to expand.

The recipe index contains 4,183 recipes across modules, with named support for Spring, Quarkus, and Micronaut. Recipes may be written as declarative YAML, Refaster templates, or imperative Java. This makes the project useful for teams that need to standardize recurring changes, although every recipe still needs deliberate selection and activation.

Key features

  • Maven and Gradle integration: Plugins run recipes within a build, making refactoring part of an existing repository workflow rather than a separate conversion utility.
  • Local execution: Maven and Gradle runs stay local and do not connect to Moderne or OpenRewrite, aside from retrieving artifacts from repositories you configure. That suits self-hosted environments and code that should remain on your infrastructure.
  • Review before applying: Maven's dry-run goal reports recipes that would change files and writes diff files in module target folders. This gives maintainers a concrete review point before edits are applied.
  • Explicit activation: The Maven plugin runs no recipe unless you activate it by name, reducing the risk of an accidental broad transformation but adding a configuration step.
  • Broad syntax coverage: Documentation names Java, Kotlin, Groovy, HCL, JSON, Properties, Protobuf, TOML, XML, and YAML. Framework examples include Spring, Quarkus, and Micronaut.
  • Repository-level batching: Batch refactoring and AST-based analysis are available, but OpenRewrite itself handles one repository at a time. Multi-repository coordination belongs to Moderne, whose platform offers native GitHub, GitLab, and Bitbucket integrations for coordinated pull requests.
  • Editor and learning support: IntelliJ IDEA 2024.1 or later has built-in OpenRewrite support, and the project recommends its OpenRewrite IntelliJ plugin. A free self-paced introductory course plus Slack and Discord communities lower the learning barrier.

Pricing

PlanPriceIncludesBest for
OpenRewrite corefreeCore framework and Apache-licensed recipes; one repository at a timeTeams running local, repository-level refactoring

The core framework and language libraries use Apache License 2.0. Some recipes are source-available or proprietary, and source-available software cannot be commercialized or offered to others as a managed service, although companies may apply it to their own code. Artifacts are distributed through the Code Genome Project repository, which requires authentication; some source-available and proprietary recipes require a Moderne subscription. 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. There are no paid OpenRewrite core tiers, seat charges, trial terms, or renewal terms stated for this plan.

Platforms

OpenRewrite targets Linux and self-hosted deployments. Maven and Gradle plugins run against one repository at a time, with Java, Kotlin, and Groovy listed as supported programming languages. The documented data-format coverage includes HCL, JSON, Properties, Protobuf, TOML, XML, and YAML.

Who it's for

Choose OpenRewrite when your team needs repeatable migrations or security and style fixes across a build-managed repository, wants AST-based transformations, and requires a dry-run diff before committing changes. It is particularly appropriate for JVM teams already using Maven or Gradle and for organizations that prefer local execution.

Look elsewhere when you need one operation coordinated across many repositories without adding Moderne, or when your compliance requirements cannot accommodate authenticated artifact repositories and varying recipe licenses. Teams outside the listed language and format coverage should also verify recipe support before committing to the workflow.

Pros and cons

Pros

  • Free Apache-licensed core: There is no charge for the framework and Apache-licensed recipes.
  • Reviewable automation: Dry-run reports and module diff files make proposed edits inspectable before application.
  • Useful recipe breadth: 4,183 recipes and named Spring, Quarkus, and Micronaut coverage support substantial modernization work.
  • Infrastructure control: Local Maven and Gradle execution avoids a required connection to Moderne or OpenRewrite.

Cons

  • One repository at a time: Fleet-wide refactoring requires Moderne rather than the core project alone.
  • Access and licensing friction: Code Genome authentication and subscription-gated source-available or proprietary recipes complicate otherwise free adoption.
  • Manual recipe selection: No recipe runs until explicitly activated, so setup and governance remain the team's responsibility.

Alternatives

ast-grep is a free option with API, extension, Linux, macOS, web, and Windows availability when you want broader client-platform choices.

CodeRush suits users seeking a free commercial-use version with the same features and updates across its free and paid subscriptions.

ReSharper is the alternative for users who want a freemium extension with a free non-commercial tier and a paid plan listed at 389.00 USD per.

Roslynator is a free choice for Linux, macOS, and Windows extension workflows, with donations welcomed.

Coccinelle is a free Linux and macOS option when its platform focus matches your environment.

CodART offers MIT-licensed software across API, Linux, self-hosted, and web deployments; SciTools Understand requires a separate professional license.

Sourcery fits teams wanting a free-forever open-source plan for public repositories with AI reviews, summaries, diagrams, one-click fixes, and custom review rules.

Spoon is a free, open-source API, Linux, and self-hosted alternative with no paid plans or usage limits stated.

Browse all code refactoring tools for more options.

Verdict

OpenRewrite is a strong recommendation for JVM teams that want controlled, repeatable repository refactoring inside Maven or Gradle, with AST-based changes and a clear review stage. Choose it for local modernization at no core-software cost; look to Moderne or another tool when you need multi-repository orchestration or cannot accept recipe-access and licensing constraints.

Alternatives to OpenRewrite

All alternatives
  1. 1Sourcery logo

    Sourcery

    Free planWebAPIExtensionLinux
    7.9From $12 a month
  2. 2Moderne logo

    Moderne

    WebAPILinuxmacOS
    7.3From $2,000 a month
  3. 3ast-grep logo

    ast-grep

    Free planWebAPIExtensionLinux
    7.0Free plan
  4. 4ReSharper logo

    ReSharper

    Free planExtensionLinuxmacOSWindows
    6.8From $389 a year
  5. 5

    jSparrow

    LinuxmacOSWindows
    6.4From $1,325 a year
  6. 6CodeRush logo

    CodeRush

    Free planExtensionLinuxmacOSWindows
    6.3Free plan