Skip to main content
Framework, library, and SDK builders use codemods to move users to new releases without carrying long-term backward compatibility. Building and maintaining codemods is hard. It does not scale well, adoption is hard to measure, and feedback is limited. Codemod gives maintainers an easy way to publish official codemods with each release, accept community contributions, and see how codemods are actually used. Codemod is already used by projects like React, Node.js, ESLint, Express, Nuxt, and many more.

Node.js logoNode.js logo

React logoReact logo

ESLint logoESLint logo

Webpack logoWebpack logo

Nuxt logoNuxt logo

pnpm logopnpm logo

MSW logoMSW logo

React Router logoReact Router logo

Get started

1

Create a dedicated repo to host your codemods

Scaffold a dedicated repository under your project’s GitHub organization to host official codemods:
npx codemod@latest init --workspace
The generated layout:
  • keeps shared publishing and repo configuration at the root
  • isolates each codemod under codemods/<slug>/
  • keeps migration logic separate from product code
  • gives maintainers a dedicated repo for collaboration and releases under the project scope
See the ESLint codemods repo for an example.
2

Secure your official scope

  • Create a free Codemod account and sign in.
  • Add your GitHub organization.
  • Install the Codemod GitHub App on your codemod repo.
This enables trusted publishing under your org scope from GitHub Actions with no API keys or secrets to manage. See the Node.js official codemods filtered via scope:nodejs in the registry for an example.
3

Build and publish codemods

At this point, your repo is fully set up for collaboration and publishing.
  • You or your community can open PRs to add or improve codemods.
  • Once merged, you can use the GitHub Action to publish the codemod to the registry under your org scope. Make sure codemod names start with your scope (@your-github-org-name/codemod-name, for example @eslint/v8-to-v9-config).
If you do not know how to build or publish codemods yet, check out the following guides:

Getting help

Join the community

Ask questions, get help, and connect with other framework maintainers on Slack.

Book a call

Schedule a demo or get hands-on help from the Codemod team.

Next steps

CLI

Learn more about Codemod CLI.

Workflows

Orchestrate complex multi-step migrations.

JSSG

Learn the transformation engine in depth.

Publishing

Authentication methods and CI/CD setup.