facebook/jscodeshift

A JavaScript codemod toolkit.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 13 minutes ago
Added to GitGenius on September 6th, 2026
Created on March 7th, 2015
Open Issues & Pull Requests: 154 (+0)
GitHub issues: Enabled
Number of forks: 497
Total Stargazers: 10,042 (+0)
Total Subscribers: 91 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 12.8 hours
Mean response time: 110.8 days
90th percentile: 409.7 days
Tracked items: 31

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 15
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,178 days
Stale 30+ days: 15
Stale 90+ days: 14

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • improvement (5)
  • bug (4)
  • discussion (2)
  • documentation (1)
  • maintenance (1)
  • question (1)
  • upstream (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

jscodeshift is a toolkit for running codemods over multiple JavaScript or TypeScript files. It provides a runner that executes transforms across files and outputs a summary of results, along with a wrapper around recast that offers a jQuery-like API for AST manipulation while preserving code style.

The tool solves the problem of applying large-scale code transformations across codebases. Rather than manually editing files, developers write a transform module that exports a function receiving file information, an API object, and options. The runner then applies this transform to each file, collecting statistics about which files were successfully modified. The wrapper around recast abstracts away low-level AST details while maintaining the original code's formatting conventions, making it practical to refactor real-world projects without losing style consistency.

jscodeshift suits teams performing large refactorings, API migrations, or systematic code cleanup across multiple files. It works well for projects using JavaScript or TypeScript and scales to processing entire directories. The tool supports both CLI usage for batch transformations and programmatic usage from JavaScript code. Transform modules can be written in TypeScript, and the runner provides debugging support through VSCode integration. The approach of preserving original code style distinguishes it from simpler AST rewriting tools that might produce reformatted output.

The project maintains active test coverage with a build status indicator on the main branch. Development activity shows ongoing maintenance of the codebase with regular updates to keep the toolkit functional across evolving JavaScript and TypeScript ecosystems. The project provides comprehensive documentation through its website, including detailed API references and examples for developers building custom transforms.