Sunday, October 25, 2026 4,350 lists 78,100 records on file
List your app or device

  1. Home
  2. Code Refactoring Tools
  3. OpenRewrite

OpenRewrite

What it is

OpenRewrite is a free, open-source ecosystem for automated code refactoring and technical-debt reduction. It applies named recipes to code represented as Lossless Semantic Trees, then prints modified trees back to source for review. Recipes address framework migrations, security fixes and style 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; they need not connect to Moderne or OpenRewrite apart from configured artifact repositories. The Maven plugin provides a dry-run goal that reports potential changes and writes diff files, and recipes must be activated by name. Documented language support includes Java, Kotlin and Groovy; formats include HCL, JSON, Properties, Protobuf, TOML, XML and YAML. Named frameworks include Spring, Quarkus and Micronaut. The recipe index lists 4,183 recipes across modules. Core and language libraries use Apache License 2.0, though some recipes have other licensing terms and authenticated repository access requirements.

For and against

For

  • Free core uses Apache License 2.0
  • Maven and Gradle plugins run recipes locally
  • Dry-run can produce diff files
  • Recipes require explicit activation
  • Supports Java, Kotlin and Groovy

Against

  • Runs against one repository at a time
  • Artifact repository requires authentication
  • Some recipes require a Moderne subscription
  • Some recipes use non-Apache licensing

The verdict

OpenRewrite provides build-integrated refactoring with reviewable changes and a broad set of recipes and formats. Its one-repository scope and mixed recipe access and licensing terms are important considerations.

Who it suits

It suits developers and teams automating migrations, security fixes or style changes in a code repository. Users seeking multi-repository execution need to look beyond OpenRewrite alone.

Plans and prices

OpenRewrite core

Free

Core framework and Apache-licensed recipes; runs one repository at a time

Every plan, in full

On the record

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 · read 4 Oct 2026
Build integrations
The project provides Maven and Gradle plugins for running recipes on one repository at a time.docs.openrewrite.org · read 5 Oct 2026
Build tools
OpenRewrite provides Maven and Gradle plugins for running recipes as part of a build.docs.openrewrite.org · read 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 · read 5 Oct 2026
Framework coverage
The documentation names Spring, Quarkus, and Micronaut among supported frameworks.docs.openrewrite.org · read 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 · read 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 · read 4 Oct 2026
Integrations
The Moderne platform page describes native GitHub, GitLab, and Bitbucket integrations for coordinated pull requests.moderne.ai · read 5 Oct 2026
Languages
The OpenRewrite project describes Java as its original focus and says language and framework coverage is expanding.docs.openrewrite.org · read 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 · read 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 · read 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 · read 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 · read 5 Oct 2026
Purpose
OpenRewrite is an open-source automated refactoring ecosystem for eliminating technical debt in code repositories.docs.openrewrite.org · read 5 Oct 2026
Recipe activation
The Maven plugin runs no recipe unless it is explicitly activated by name.docs.openrewrite.org · read 4 Oct 2026
Recipe catalog
The recipe index lists 4,183 recipes across modules.docs.openrewrite.org · read 4 Oct 2026
Recipe formats
Recipes can be authored as declarative YAML, Refaster templates, or imperative Java.moderne.ai · read 5 Oct 2026
Recipes
Recipes automate framework migrations, security fixes, and stylistic consistency tasks.docs.openrewrite.org · read 5 Oct 2026

The review

OpenRewrite is an open-source ecosystem for automating code refactoring through reusable recipes. It is best suited to teams maintaining Java, Kotlin, or Groovy repositories that want build-integrated changes and reviewable diffs. The free core is compelling for repository-level modernization, 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 transformations, and prints the result back to code. That foundation supports repeatable framework migrations, security fixes, and stylistic consistency work without reducing maintenance to manual search-and-replace. 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 is a substantial base for teams with recurring modernization tasks, although each recipe still has to be selected and activated deliberately.

Key features

  • Build-integrated execution: Maven and Gradle plugins run recipes as part of a build, making refactoring fit existing automation. They execute locally without connecting to Moderne or OpenRewrite, apart from configured artifact repositories.
  • Review before changing code: The Maven dry-run goal reports recipes that would produce changes and writes diff files in module target folders. That gives maintainers a concrete review step before applying a migration.
  • Explicit activation: The Maven plugin runs no recipe unless it is activated by name. This avoids accidental broad transformations, but it places responsibility on build owners to configure the intended recipes.
  • Broad syntax coverage: Documentation covers Java, Kotlin, and Groovy, plus HCL, JSON, Properties, Protobuf, TOML, XML, and YAML. The core language set is strongest for JVM teams; other formats extend the same workflow to configuration and infrastructure files.
  • Recipe authoring: YAML, Refaster, and Java authoring options accommodate declarative rules, templates, and more involved imperative logic.
  • IDE assistance: IntelliJ IDEA 2024.1 or later has built-in OpenRewrite support, and the project recommends enabling its OpenRewrite IntelliJ plugin.
  • Learning and community help: A free, self-paced introductory course is available, with community questions handled through Slack or Discord. Support is also offered at [email protected].

Pricing

PlanPriceIncludes
OpenRewrite corefreeCore framework and Apache-licensed recipes; batch, AST-based refactoring against one repository at a time.

The free, open-source core is a strong fit for individual maintainers and teams that can operate one repository per run. It does not include coordinated multi-repository execution; Moderne provides that scale. OpenRewrite artifacts are distributed through the Code Genome Project repository, which requires authentication. Some source-available and proprietary recipes require a Moderne subscription, so the zero-cost core does not guarantee access to every recipe in the catalog.

Apache-licensed components use Apache License 2.0. Source-available software may be applied to a company's own code but may not be commercialized or provided to others as a managed service. Open-source projects can use Apache-licensed and Moderne Source Available recipes through the Maven and Gradle plugins or Moderne CLI without a license for those repositories.

Platforms

OpenRewrite runs on Linux in self-hosted environments. Maven and Gradle integrations execute locally, and the project describes operation on one repository at a time. Native GitHub, GitLab, and Bitbucket integrations for coordinated pull requests are described for the Moderne platform rather than the standalone core.

Who it's for

Choose OpenRewrite if your team owns JVM codebases and needs repeatable migrations, security remediation, or style changes that can be reviewed as build artifacts. It is particularly suitable for organizations comfortable maintaining Maven or Gradle configuration and, where necessary, authoring their own recipes.

It is less suitable when a program must update many repositories in one coordinated operation, or when required recipes carry source-available or proprietary terms that do not fit your distribution model. Those cases point toward Moderne or a different tool with simpler licensing and fleet-wide execution.

Pros and cons

Pros

  • Reviewable AST-based changes: Lossless Semantic Trees and dry-run diffs make proposed edits inspectable before they enter the codebase.
  • Useful recipe breadth: 4,183 recipes and named Spring, Quarkus, and Micronaut coverage address common modernization work.
  • Local build integration: Maven and Gradle plugins keep execution inside existing, self-hosted workflows.
  • No core purchase price: The framework and Apache-licensed recipes are free to use.

Cons

  • One repository per run: Fleet-wide refactoring requires Moderne rather than OpenRewrite alone.
  • Access friction: Code Genome artifact distribution requires authentication, and some recipes require a Moderne subscription.
  • License variation: Not every catalog recipe shares the core's Apache 2.0 terms.
  • Configuration responsibility: Recipes do nothing until explicitly activated, so rollout depends on careful build setup.

Alternatives

PolyglotPiranha is a free option when you need API, iOS, Linux, macOS, or self-hosted availability rather than OpenRewrite's Linux-focused build plugins.

ast-grep is worth choosing for a free tool spanning API, extension, Linux, macOS, web, and Windows environments.

CodeRush suits users seeking an extension with free commercial use and the same features and updates across its free and paid subscriptions.

Sourcery is the better match for teams wanting a freemium workflow with AI reviews, pull-request summaries, diagrams, and one-click fixes in its free open-source plan.

Spoon offers a free, open-source alternative with API, Linux, and self-hosted availability.

Coccinelle is a free choice for Linux and macOS users.

ReSharper fits non-commercial users seeking free C# support in VS Code and compatible editors, with paid plans beyond that use case.

Roslynator is a free option built around its tools and extensions for Linux, macOS, and Windows.

See the broader Code Refactoring Tools list for more options.

Verdict

OpenRewrite is a strong recommendation for JVM teams that want free, repeatable refactoring embedded in Maven or Gradle and checked through diffs before application. Its main reason to choose it is the combination of AST-based recipes, broad framework coverage, and local execution. Look elsewhere when coordinated multi-repository work, unrestricted recipe licensing, or a non-Linux workflow is central to the project.

Alternatives to OpenRewrite

Every alternative, ranked