← Open Source

The CLI for codemods: scaffold, share, and run multi-step transformations of any size. First-class ast-grep support. Fast, reliable, polyglot.

ApplicationsCodingProductivityRust
Momentum
+0stars in 24 hours0.0%
1.14k
Stars
85
Forks
+3
This week
51
Contributors
Created 2024-01-26 · Updated 2026-12-03 · #14191 today
Top developers
README


Platform · Community · Docs

Codemod

Codemod is the AI-powered, community-led platform for automating code migrations, framework upgrades, and large-scale changes.

This repo houses the Codemod CLI and its underlying workflow engine – everything you need to scaffold, test, and run codemods locally or in CI. The CLI can also connect to Codemod’s hosted Registry and Platform when you want to publish or orchestrate migrations across many repositories.

Key Features

  • Codemod CLI – Run, test, and publish codemods from your terminal or CI.
  • Workflows – Orchestrate multi-step migrations in TypeScript, with resumable steps and manual approval gates.
  • JSSG – JavaScript ast-grep: write powerful AST transformations in TypeScript with pattern matching and semantic analysis.
  • Codemod Registry – Share or discover community codemods via npx codemod@next publish or npx codemod@next search.
  • Codemod MCP – AI tools for code analysis, AST manipulation, and codemod creation in AI-powered IDEs.

Getting Started

Codemod 2.0 is published on npm under the next tag, and latest is still 1.x, so these commands run codemod@next.

# 1) Open the interactive launcher
npx codemod@next

# 2) Scaffold a new codemod project
npx codemod@next init my-codemod

# 3) Run it locally
npx codemod@next workflow run -w my-codemod -t ./path/to/project

# 4) Publish it when you're ready
npx codemod@next publish my-codemod

# 5) Run it from the Registry
npx codemod@next @codemod/my-codemod

In an interactive terminal, bare npx codemod@next opens a launcher for creating a package or running one from the registry. In non-interactive contexts, it prints next steps and exits with status 1.

See the full CLI reference for every command and option.

Codemod Platform

The CLI is the engine that powers campaigns inside Codemod Platform. Need to coordinate changes across multiple repositories, track progress, or collaborate with your team? The Platform adds insights, orchestration, dashboards, and authoring tools that help teams successfully land large-scale code migrations.

Explore our documentation to learn more, and join the conversation or share your feedback in our Slack community.

Contributing

There are two ways to contribute to the Codemod ecosystem:

Contribute to Codemod OSS

Help improve the CLI, workflow engine, and JSSG runtime. See the contributing guide to get started with development setup, testing, and pull requests.

Build and share codemods

Create codemods for framework upgrades, security patches, or common refactoring patterns. Published codemods help the entire community migrate faster.

Looking for ideas? Spark a discussion in our Slack community or browse Codemod Registry for codemods that could use improvements.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Alex Bit

💻 📖

Mohamad Mohebifar

💻 🐛

Amirabbas Ghasemi

💻 🐛

Mohab Sameh

💻 📖

Siamak

💻 🐛 🎨

Jahred Hope

💻

Jacob Smith

📖

Augustin Mauroy

💻 🐛 🤔

Bruno Rodrigues

💻

Cameron Seebach

🐛 💻

Benny Joo

💻 🐛 📖

Grzegorz

🐛 💻

Greg Pabian

💻 🐛 📖

arshcodemod

📖 📢

Sasha

💻 🐛

Mikhail Demidoff

💻

Aleksy

💻 🐛

Pardis Pashakhanloo

💻 📝 🔣

DmytroHryshyn

💻 🐛

kevtran2

📖 💻

Max Leiter

💻

Manish Jha

🐛 💻

with-heart

🐛 📖 🤔

Aniello Falcone

🐛

Harsh Gupta

💻

Nuurek

💻 🐛

Norayr Baghdasarov

💻 🐛

Espen Bye

🐛

Jake Riordan

💻 🐛

Jonathan Giardino

💻 🐛

Mohamed Amine Diboune

💻

Seif Ghezala

💻

Ahmad Soliman

💻

Maciej Lotkowski

🐛

Jay Kumar

💻

Shinya Fujino

📖 💻 🐛

coderaiser

💻

Zach Wolf

🐛

Serhii Melnyk

🤔

Henry Q. Dineen

💻 🐛

Matthias

🐛

Mohammad Bagher Abiyat

🚇

Yugal Agarwal

💻

Sameer Poswal

💻 🐛

Michael Stramel

📖

George W Langham

🐛

Siddhesh Mhadnak

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store