Coccinelle vs jscodeshift
Coccinelle
coccinelle.gitlabpages.inria.frjscodeshift
jscodeshift.comSide by side
| Figure | Coccinelle | jscodeshift |
|---|---|---|
| Price from | Free | — |
| Free plan | Yes | — |
| Free trial | — | — |
| Open source | — | — |
| Windows | — | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | — | Yes |
| Plans published | 1 | 0 |
| Spec score · Code Refactoring Tools | 7.9 (#9) | 7.7 (#13) |
| Purpose | Coccinelle is a program matching and transformation engine that uses SmPL to specify desired matches and transformations in C code. | jscodeshift is a toolkit for building and running codemods over multiple JavaScript or TypeScript files. |
Plans
In their own words
Coccinelle
Coccinelle is a free program matching and transformation engine for working with C code. It uses SmPL to describe code patterns and the transformations to apply when matches are found. A single semantic patch can change code at many sites across hundreds of files while allowing for differences in spacing, variable names, irrelevant code, and coding style. The project describes uses including automating collateral changes after library API evolution and finding and fixing bugs in systems code. Coccinelle semantic patches and bug fixes have been integrated into the official Linux tree, and semantic patches are available in the Linux scripts directory for use with coccicheck. It supports C and C++, with C++ mode invoked using --c++; the project says its C++ support is still being extended, including for high performance computing. The download page lists version 1.3.3, dated September 2, 2026, with source code and precompiled spatch builds. It is available for Linux and macOS as desktop software. Source builds require OCaml, with Python and Menhir needed in specified cases.
jscodeshift
jscodeshift is a free toolkit for developers who build and run codemods across JavaScript, TypeScript, or Flow projects. A codemod parses source into an abstract syntax tree, changes that tree, and generates source code. The runner applies a transform to each file and reports files that were not transformed. Its command line accepts a local transform, a URL, or paths from standard input. Parser choices include Babel, Babylon, Flow, TypeScript, and TSX, with Babel as the default. Users can set child-process limits, choose extensions, exclude paths with ignore patterns or configuration files, and preview changes in dry-run mode. The API supports traversal, filtering, finding, replacing, inserting, removing, and renaming syntax-tree nodes, with optional formatting during output. jscodeshift wraps recast to help preserve source style. Jest and Jasmine utilities support fixture or inline tests, and VS Code debugging guidance is documented. It runs on Linux, macOS, Windows, or self-hosted environments under an MIT license.