Official codemods for your organization to help users adopt new features and handle breaking changes with less manual work.
Community contributions are welcome. Use this repository to create, validate, and publish codemods from a shared monorepo.
- Create this codemod repository in your organization.
- Sign in to Codemod with your GitHub account.
- Install the Codemod GitHub app for this repository so publishes can be associated with your organization.
- Configure a trusted publisher in Codemod so GitHub Actions can publish with OIDC.
- Reserve an organization scope in Codemod before publishing so your packages stay grouped in the Codemod Registry.
Use Codemod MCP and npx codemod init to create new codemods from this monorepo.
Each codemod lives under codemods/<slug>/.
codemods/<slug>/
workflow.yaml
codemod.yaml
scripts/
tests/
Keep each codemod self-contained so maintainers can validate and publish packages independently.
- Scaffold new codemods with
npx codemod init. - Use Codemod MCP when creating or refining codemods, especially when symbol definitions or cross-file references matter.
- Validate package workflows with
npx codemod workflow validate codemods/<slug>/workflow.yaml. - Run package tests from the codemod directory before publishing.
Caution
Codemods modify code. Run them only on Git-tracked files, and commit or stash changes first.
npx codemod <codemod-name>npx codemod workflow run -w codemods/<slug>/workflow.yamlBy default, codemods run in the current folder. Add --target /path/to/repo to run elsewhere.
- Use the generated GitHub Actions workflow to publish after review and merge.
- Add a
CONTRIBUTING.mdin this repository to document review, testing, and release expectations for contributors. - See the Codemod docs for CLI and publishing details.