Side by side
Coccinelle vs jscodeshift
Both stand on code refactoring tools. Which one you can start free with, which one lets you read the code, and what each costs once you pay.
Free plan LinuxMac
Coccinelle focuses on repository-wide matching and transformations expressed as semantic patches. It is free, but source builds have prerequisites and C++ support is still being extended.
Visit Coccinelle Free plan LinuxMacSelf-hosted+1
jscodeshift combines a multi-file runner with AST transformation methods, dry runs and test utilities. It is a practical fit for developers automating code changes across a project, provided they are comfortable working with codemods and the command line.
Visit jscodeshiftThe facts
| Coccinelle | jscodeshift | |
|---|---|---|
| Free plan | Yes | Yes |
| Open source | Not published | Not published |
| Runs on | Linux, Mac | Linux, Mac, Self-hosted, Windows |
| Lowest paid plan | Free or on request | Not published |
| Plans published | 1 | None |
| Maker | Not published | Not published |
| Website | coccinelle.gitlabpages.inria.fr | jscodeshift.com |
| On code refactoring tools | #4 of 22 | #8 of 22 |
Coccinelle: what it does well
- Semantic patches can update many files and code sites.
- Handles variation in spacing, names and coding style.
- Semantic patches and bug fixes are integrated into Linux.
- Free, with source and precompiled spatch builds available.
- Documentation includes grammar, examples and an introductory lecture.
What to know first
- Available for Linux and macOS only.
- Building from source requires OCaml.
- Python and Menhir are needed in certain build situations.
jscodeshift: what it does well
- Runs codemods across multiple files.
- Dry-run previews changes without modifying files.
- Offers Babel, Babylon, Flow, TypeScript and TSX parsers.
- Includes Jest and Jasmine transform-testing utilities.
- MIT-licensed and free.
What to know first
- Requires a local installation through npm.
- Babel is the default parser, so other syntax may need selection.
- It is a developer toolkit for code transformations.
Alternatives to Coccinelle Alternatives to jscodeshift The whole list
