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.
- Workflows β Scaffold, test, and orchestrate complex, multi-step migrations with ast-grep YAML or JavaScipt ast-grep (jssg).
- Codemod Registry β Share or discover community codemods via
npx codemod@next publish
ornpx codemod@next search
.
# 1) Scaffold a new codemod project
npx codemod@next init my-codemod
# 2) Test it locally
npx codemod@next workflow run -w my-codemod/workflow.yaml
# 3) Publish it when you're ready
npx codemod@next publish my-codemod
# 4) Run it from the Registry
npx codemod@next @codemod-com/my-codemod
See the full CLI reference for every command and option.
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.
Learn more in the docs and share feedback on the feedback board. We also hang out in Slack β join us at go.codemod.com/community.
We welcome contributions to the Codemod CLI. Please see the contributing guide to get started.
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!