OpenRewrite iconOpenRewrite

oss Free Star3k

Open-source automated refactoring ecosystem that eliminates technical debt through intelligent code transformations and migrations at scale

2K+ GitHub Stars
500+ Recipes
2018 Founded

Overview

OpenRewrite is an open-source automated refactoring ecosystem designed to eliminate technical debt at scale by enabling developers to perform large-scale code transformations safely and reliably. The platform provides a library of pre-built "recipes" that can automatically update frameworks, migrate between versions, apply security patches, and modernize code patterns across entire repositories or organizations. Unlike simple find-and-replace tools, OpenRewrite uses semantic code analysis and type-aware transformations to ensure correctness, making it possible to perform complex refactorings that would be error-prone or impossible to do manually. The project is backed by Moderne, which offers commercial services for enterprise-scale code modernization.

The Verdict

Who Should Use OpenRewrite?

Best For

  • Engineering teams managing large Java/Kotlin codebases with significant technical debt
  • Organizations performing framework migrations (Spring Boot, JUnit, Java versions)
  • Platform teams standardizing code patterns and best practices across repositories
  • Security teams applying vulnerability patches and security fixes at scale
  • Companies with microservices architectures requiring consistent updates across services

Not Ideal For

  • Small projects where manual refactoring is manageable
  • Languages other than Java, Kotlin, or Groovy (limited support for others)
  • Teams without CI/CD infrastructure to integrate automated refactoring

What's Great

  • Completely open-source with extensive library of pre-built refactoring recipes
  • Type-aware transformations ensure correctness and prevent breaking changes
  • Handles complex migrations like Spring Boot upgrades, Java version updates automatically
  • Active community with weekly code remix sessions and comprehensive documentation
  • Integrates with Maven, Gradle, and CI/CD pipelines for automated execution

Watch Out For

  • Learning curve required to write custom recipes effectively
  • Primarily focused on JVM languages, limited support for other ecosystems
  • Some complex transformations may require manual review and adjustment

Pricing

View all features & details

Key Features

  • 500+ pre-built refactoring recipes
  • Type-aware code transformation engine
  • Framework migration (Spring Boot, Quarkus, Micronaut)
  • Java version upgrades (8 to 11, 11 to 17, etc.)
  • Security vulnerability patching
  • Custom recipe development with Java DSL

Supported Languages

  • Java (primary)
  • Kotlin
  • Groovy
  • XML, YAML, JSON (config files)
  • Limited: Python, JavaScript (experimental)

How It Compares

Feature OpenRewrite Semgrep Sensei
Approach Automated refactoring Static analysis + autofix IDE-based refactoring
Language Support Java/Kotlin primary 30+ languages IntelliJ supported languages
Pricing Free (OSS) Free + Pro Commercial
Best For Large-scale migrations Security scanning Developer-guided refactoring

User Reviews

Loading reviews...