OpenRewrite vs PolyglotPiranha
OpenRewrite
openrewrite.orgPolyglotPiranha
github.comSide by side
| Figure | OpenRewrite | PolyglotPiranha |
|---|---|---|
| Price from | Free | — |
| Free plan | Yes | — |
| Free trial | — | — |
| Open source | — | — |
| macOS | — | Yes |
| Linux | Yes | Yes |
| iOS | — | Yes |
| API | — | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 0 |
| Spec score · Code Refactoring Tools | 8.2 (#6) | 7.2 (#19) |
| Integrations | The Moderne platform page describes native GitHub, GitLab, and Bitbucket integrations for coordinated pull requests. | The Python wrapper is described as suitable for incorporation into pipelines; the documentation does not name specific CI or feature flag vendor integrations. |
| Languages | The OpenRewrite project describes Java as its original focus and says language and framework coverage is expanding. | The CLI lists Java, Swift, Python, Kotlin, Go, TSX, and TypeScript as target languages. |
| Purpose | OpenRewrite is an open-source automated refactoring ecosystem for eliminating technical debt in code repositories. | Polyglot Piranha is a lightweight code transformation toolset for automating large scale changes and is used at Uber mostly to clean up stale feature flags. |
| Security | Moderne's press kit states that Moderne is SOC 2 Type 2 compliant. | The repository identifies the project as provided as-is and does not state security certifications or compliance claims. |
| Support | The OpenRewrite documentation invites users to ask questions in Slack or Discord and lists [email protected]. | Users with questions or bug reports are directed to open a GitHub issue. |
Plans
In their own words
OpenRewrite
OpenRewrite is an open-source ecosystem for automated code refactoring, aimed at updating code and reducing technical debt. It represents code as Lossless Semantic Trees, applies transformations, and prints the result back into source code for review. Its recipes cover framework migrations, security fixes, and style consistency, and can be written in YAML, Refaster templates, or Java. Maven and Gradle plugins run recipes locally as part of builds, one repository at a time. The Maven plugin offers a dry run that reports potential changes and writes diff files; recipes run only when explicitly activated by name. Documented support includes Java, Kotlin, and Groovy, plus formats such as HCL, JSON, Properties, Protobuf, TOML, XML, and YAML. Framework coverage includes Spring, Quarkus, and Micronaut. The recipe index lists 4,183 recipes across modules. Core and language libraries use Apache License 2.0, but some recipes have other licensing terms. Core is free; some artifacts require authenticated repository access, and some recipes require a Moderne subscription.
PolyglotPiranha
PolyglotPiranha is a free, multilingual structural search-and-replace engine for code cleanup. It can refactor stale feature-flag code when given a flag name, expected behavior, and configured feature-flag API rules. Rules can form graphs, and built-in language-specific cleanups include simplifying boolean expressions and if-else statements, removing empty declarations and files, and inlining local variables. Queries and filters may use Tree-sitter queries, regular expressions, or Piranha’s concrete syntax. The project is available as a Python library and command-line tool, with the Python API wrapping the CLI. The CLI lists Java, Swift, Python, Kotlin, Go, TSX, and TypeScript as target languages. Dry runs prevent in-place rewriting and produce summaries of matches, rewrites, and resulting file content. API configuration requires code path, configuration path, target language, and substitutions, with optional rules.toml and edges.toml files. Python installation uses pip; the CLI can be built with Rust and Cargo or obtained from releases. Piranha is Apache 2.0, provided as is, and not an official Uber product.