Skip to content
SPECIFICTION
Get listed

Comby vs PolyglotPiranha

Comby

comby.dev

PolyglotPiranha

github.com

Side by side

FigureCombyPolyglotPiranha
Price from——
Free plan——
Free trial——
Open source——
WindowsYes—
macOSYesYes
LinuxYesYes
iOS—Yes
APIYesYes
Self-hostedYesYes
Plans published00
Spec score · Code Refactoring Tools7.7 (#12)7.2 (#19)
InstallationThe getting-started page documents installation on macOS with Homebrew, Ubuntu with a shell installer, Windows through Ubuntu on WSL, and Docker.The Python API is installed with pip, while the CLI can be built from source with Rust and Cargo or obtained from the repository’s releases.
LicenseThe public comby-tools/comby GitHub repository identifies its license as Apache-2.0.Piranha is licensed under Apache 2.0.
PurposeComby is a tool for searching and changing code structure using lightweight templates.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.
SupportThe help page directs users to the Gitter channel for usage questions and pattern-writing help, and to GitHub issues for installation problems.Users with questions or bug reports are directed to open a GitHub issue.

In their own words

Comby

Comby is a free, open-source tool for searching and changing code structure with lightweight templates. It recognizes basic syntax in code, strings, and comments across many languages, with parsers listed for C/C++, C#, Go, Java, JavaScript, Python, Rust, Swift, and TypeScript, plus a generic matcher for other formats. The project targets large refactors and one-off changes, and an interactive review mode lets users inspect proposed edits. Comby can run from its command line, Python bindings, or HTTP requests sent to a server on your machine. Installation instructions cover macOS with Homebrew, Ubuntu, Windows through Ubuntu on WSL, and Docker; building from source is also described. Linked projects include an Emacs package and a prototype VS Code extension. Other uses include structural code search, compiler fuzzing, test-case reduction, editor find and replace, and academic research. Comby matches balanced delimiters while accounting for comments and string literals, and supports regex search. It is self-hosted and available for API, Linux, macOS, and Windows use. The Apache-2.0 license is identified in the public repository.

Visit comby.dev

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.

Visit github.com