REMOVE THIS SECTION ONCE THE REPO IS SET UP.
Framework/SDK maintainers: This template includes setup guides, utilities, and a GitHub Action to help you and your community build and publish codemods with ease.
- Sign up at app.codemod.com with your GitHub account.
- Install the Codemod app:
- Go to app.codemod.com/studio.
- In Results, click Select Repo.
- Installing the app for a repo in your GitHub org reserves a scope matching your org name.
- Example: only admins of the
nodejs
org can publish codemods starting with@nodejs
.- All official codemods appear in the Registry under that scope.
- Important: In each
codemod.yaml
, make surename
starts with your scope.
- Generate an API key at app.codemod.com/api-keys.
- In your repo: Settings → Secrets and variables → Actions
- Create a repository secret:
- Name:
CODEMOD_API_KEY
- Value: your API key from step 1.
✅ Done! After a codemod PR is merged, you can trigger the GitHub Action to auto-publish it to the Codemod Registry under your org scope. See Node.js codemods for an example.
Official <FRAMEWORK_OR_SDK_OR_ORG> codemods to help users adopt new features and handle breaking changes with ease.
Community contributions are welcome and appreciated! Check open issues for codemods to build, or open a new one if something’s missing. See the contribution guide for details.
Caution
Codemods modify code! Run them only on Git-tracked files, and commit or stash changes first.
Recommended for the best UX. This downloads the package from the Registry.
npx codemod@latest <codemod-name>
For example:
npx codemod@latest @nodejs/tmpDir-to-tmpdir
npx codemod workflow run -w /path/to/folder/containing/workflow.yaml
Note
By default, codemods run in the current folder. Add -t /target/path
to change it.
See the Codemod docs for all CLI commands and options.
See SECURITY.md.
MIT