Codemod
The CLI for codemods: scaffold, share, and run multi-step transformations of any size. First-class ast-grep support. Fast, reliable, polyglot.
Install / Use
/learn @codemod/CodemodREADME
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 with YAML configuration, matrix strategies, 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 publishornpx codemod search. - Codemod MCP – AI tools for code analysis, AST manipulation, and codemod creation in AI-powered IDEs.
Getting Started
# 1) Open the interactive launcher
npx codemod
# 2) Scaffold a new codemod project
npx codemod init my-codemod
# 3) Test it locally
npx codemod workflow run -w my-codemod/workflow.yaml
# 4) Publish it when you're ready
npx codemod publish my-codemod
# 5) Run it from the Registry
npx codemod @codemod/my-codemod
In an interactive terminal, bare npx codemod 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.
- Workflows quickstart – Scaffold your first codemod package
- JSSG guide – Write AST transformations in JS/TS
- Publishing – Share your contributions to Codemod Registry
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):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="https://github.com/alexbit-codemod/"><img src="https://avatars.githubusercontent.com/u/78109534?v=4?s=100" width="100px;" alt="Alex Bit"/><br /><sub><b>Alex Bit</b></sub></a><br /><a href="https://github.com/codemod/codemod/commits?author=alexbit-codemod" title="Code">💻</a> <a href="https://github.com/codemod/codemod/commits?author=alexbit-codemod" title="Documentation">📖</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/mohebifar"><img src="https://avatars.githubusercontent.com/u/6104558?v=4?s=100" width="100px;" alt="Mohamad Mohebifar"/><br /><sub><b>Mohamad Mohebifar</b></sub></a><br /><a href="https://github.com/codemod/codemod/commits?author=mohebifar" title="Code">💻</a> <a href="https://github.com/codemod/codemod/issues?q=author%3Amohebifar" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/amirabbas-gh"><img src="https://avatars.githubusercontent.com/u/93479436?v=4?s=100" width="100px;" alt="amirabbas-gh"/><br /><sub><b>Amirabbas Ghasemi</b></sub></a><br /><a href="https://github.com/codemod/codemod/commits?author=amirabbas-gh" title="Code">💻</a> <a href="https://github.com/codemod/codemod/issues?q=author%3Aamirabbas-gh" title="Bug reports">🐛</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/mohab-sameh"><img src="https://avatars.githubusercontent.com/u/37941642?v=4?s=100" width="100px;" alt="Mohab Sameh"/><br /><sub><b>Mohab Sameh</b></sub></a><br /><a href="https://github.com/codemod/codemod/commits?author=mohab-sameh" title="Code">💻</a> <a href="https://github.com/codemod/codemod/commits?author=mohab-sameh" title="Documentation">📖</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/siamak"><img src="https://avatars.githubusercontent.com/u/3109082?v=4?s=100" width="100px;" alt="siamak"/><br /><sub><b>Siamak</b></sub></a><br /><a href="https://github.com/codemod/codemod/commits?author=siamak" title="Code">💻</a> <a href="https://github.com/codemod/codemod/issues?q=author%3Asiamak" title="Bug reports">🐛</a> <a href="https://github.com/codemod/codemod/commits?author=siamak" title="Design">🎨</a></td> <td align="center" valign="top" width="14.28%"><a href="http://jahred.me"><img src="https://avatars.githubusercontent.com/u/13903378?v=4?s=100" width="100px;" alt="Jahred Hope"/><br /><sub><b>Jahred Hope</b></sub></a><br /><a href="https://github.com/codemod/codemod/commits?author=jahredhope" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/JakobJingleheimer"><img src="https://avatars.githubusercontent.com/u/3012099?v=4?s=100" width="100px;" alt="Jacob Smith"/><br /><sub><b>Jacob Smith</b></sub></a><br /><a href="https://github.com/codemod/codemod/commits?author=JakobJingleheimer" title="Documentation">📖</a></td> </tr> <tr> <td align="center" valign="top" width="14.28%"><a href="http://augustinmauroy.github.io/"><img src="https://avatars.githubusercontent.com/u/97875033?v=4?s=100" width="100px;" alt="Augustin Mauroy"/><br /><sub><b>Augustin Mauroy</b></sub></a><br /><a href="https://github.com/codemod/codemod/commits?author=AugustinMauroy" title="Code">💻</a> <a href="https://github.com/codemod/codemod/issues?q=author%3AAugustinMauroy" title="Bug reports">🐛</a> <a href="#ideas-AugustinMauroy" title="Ideas, Planning, & Feedback">🤔</a></td> <td align="center" valign="top" width="14.28%"><a href="http://brunocroh.com"><img src="https://avatars.githubusercontent.com/u/13812512?v=4?s=100" width="100px;" alt="Bruno Rodrigues"/><br /><sub><b>Bruno Rodrigues</b></sub></a><br /><a href="https://github.com/codemod/codemod/commits?author=brunocroh" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/spirulence"><img src="https://avatars.githubusercontent.com/u/1297151?v=4?s=100" width="100px;" alt="Cameron Seebach"/><br /><sub><b>Cameron Seebach</b></sub></a><br /><a href="https://github.com/codemod/codemod/issues?q=author%3Aspirulence" title="Bug reports">🐛</a> <a href="https://github.com/codemod/codemod/commits?author=spirulence" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/hbjORbj"><img src="https://avatars.githubusercontent.com/u/32841130?v=4?s=100" width="100px;" alt="Benny Joo"/><br /><sub><b>Benny Joo</b></sub></a><br /><a href="https://github.com/codemod/codemod/commits?author=hbjORbj" title="Code">💻</a> <a href="https://github.com/codemod/codemod/issues?q=author%3AhbjORbj" title="Bug reports">🐛</a> <a href="https://github.com/codemod/codemod/commits?author=hbjORbj" title="Documentation">📖</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/grzim"><img src="https://avatars.githubusercontent.com/u/8398557?v=4?s=100" width="100px;" alt="Grzegorz"/><br /><sub><b>Grzegorz</b></sub></a><br /><a href="https://github.com/codemod/codemod/issues?q=author%3Agrzim" title="Bug reports">🐛</a> <a href="https://github.com/codemod/codemod/commits?author=grzim" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://medium.com/@greg-pabian/"><img src="https://avatars.githubusercontent.comRelated Skills
openhue
343.3kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
343.3kElevenLabs text-to-speech with mac-style say UX.
weather
343.3kGet current weather and forecasts via wttr.in or Open-Meteo
tweakcc
1.5kCustomize Claude Code's system prompts, create custom toolsets, input pattern highlighters, themes/thinking verbs/spinners, customize input box & user message styling, support AGENTS.md, unlock private/unreleased features, and much more. Supports both native/npm installs on all platforms.
