# comby-tools/comby

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/comby-tools-comby).**

2,657 stars · 74 forks · OCaml · Apache-2.0

## Links

- GitHub: https://github.com/comby-tools/comby
- Homepage: https://comby.dev
- awesome-repositories: https://awesome-repositories.com/repository/comby-tools-comby.md

## Topics

`c` `go` `java` `javascript` `linting` `parser-combinators` `parsing` `php` `program-transformation` `python` `reason` `refactoring` `regex` `rewriting` `rust` `search-and-replace` `swift` `syntax` `syntax-transformation` `typescript`

## Description

Comby is a command-line utility designed for structural code search and transformation across diverse programming languages. It functions as a code transformation engine that identifies and modifies source code patterns by utilizing syntax-aware templates, ensuring that operations respect language boundaries such as nested blocks, strings, and comments.

The tool distinguishes itself by mapping various programming languages to a unified structural representation, allowing for consistent pattern matching that ignores irrelevant whitespace and formatting. It performs these operations by executing search and replacement tasks through a state machine that validates structural integrity, enabling precise modifications while preserving the original indentation and stylistic conventions of the source files.

Beyond simple search and replace, the tool supports large-scale codebase migrations and automated refactoring by applying project-wide syntax updates. Users can verify these modifications through an interactive terminal interface, which allows for the inspection and selective reconciliation of changes before they are committed to the filesystem.

## Tags

### Software Engineering & Architecture

- [Code Transformation Engines](https://awesome-repositories.com/f/software-engineering-architecture/code-transformation-engines.md) — Functions as a code transformation engine that matches and modifies source code patterns using structural templates. ([source](https://github.com/comby-tools/comby/blob/master/Commit))
- [Syntax Abstractions](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/abstraction-domain-modeling/language-agnostic-logic-models/syntax-abstractions.md) — Maps diverse programming languages to a unified structural representation for consistent pattern matching.
- [Large-Scale Code Migrations](https://awesome-repositories.com/f/software-engineering-architecture/large-scale-code-migrations.md) — Supports large-scale codebase migrations by applying project-wide syntax updates.
- [Structural Matching State Machines](https://awesome-repositories.com/f/software-engineering-architecture/state-machine-logic/lightweight-state-machines/automation-state-machines/entity-state-machines/application-state-machines/state-machine-integrations/structural-matching-state-machines.md) — Executes search operations by traversing a state machine that validates structural integrity against templates.
- [Syntax-Aware Transformation Engines](https://awesome-repositories.com/f/software-engineering-architecture/syntax-aware-diffing/syntax-aware-transformation-engines.md) — Modifies code structures using templates that understand language syntax to ensure safety.

### Data & Databases

- [Structural Code Searchers](https://awesome-repositories.com/f/data-databases/search-indexing-technologies/search-indexing/search-information-retrieval/code-context-search/structural-code-searchers.md) — Identifies specific code patterns across multiple files using syntax-aware matching. ([source](https://github.com/comby-tools/comby/blob/master/Commit))
- [Recursive Descent Parsers](https://awesome-repositories.com/f/data-databases/data-transformation-functions/recursive-processors/recursive-logic-implementations/recursive-descent-parsers.md) — Uses recursive descent parsing to isolate code blocks from comments and strings during structural analysis.

### Development Tools & Productivity

- [Automated Code Refactoring](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-analysis-and-transformation/automated-code-refactoring.md) — Automates large-scale code refactoring and syntax updates across multiple files. ([source](https://comby.dev/))
- [Interactive Change Reviewers](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-analysis-tools/local-change-reviewers/change-proposal-workflows/architectural-change-proposals/interactive-change-reviewers.md) — Provides a terminal interface for inspecting and selectively reconciling code changes before committing.
- [Change Review Interfaces](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/code-analysis-tools/local-change-reviewers/change-review-interfaces.md) — Displays suggested modifications in a terminal interface for selective review and acceptance. ([source](https://github.com/comby-tools/comby#readme))
- [Code Refactoring Tools](https://awesome-repositories.com/f/development-tools-productivity/code-refactoring-tools.md) — Provides a command-line utility for syntax-aware search and replace operations across multiple languages.
- [Source Code Mutators](https://awesome-repositories.com/f/development-tools-productivity/in-place-file-mutators/source-code-mutators.md) — Modifies source files directly on disk while preserving original indentation and stylistic conventions.

### Programming Languages & Runtimes

- [Structural Pattern Matching](https://awesome-repositories.com/f/programming-languages-runtimes/structural-pattern-matching.md) — Matches code patterns by parsing syntax boundaries into abstract templates that ignore irrelevant whitespace.
