A Codemod package is a set of files that define an automated code transformation. Codemod Packages let you create, test, and distribute reusable transformations that update source code across entire codebases. Packages range from quick, single-file refactors to advanced, multi-step migrations. They’re fully portable—run them locally, in CI, or share with your team.Documentation Index
Fetch the complete documentation index at: https://codemodcom.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Create a new Codemod package
Scaffold a new Codemod package:Each package includes your transformation logic (written in JavaScript, TypeScript, or YAML), a project manifest, and workflow specification.When creating a new codemod project, you’ll be prompted for:
- Project directory
- Codemod type:
- Target language
- Project name
- Description
- Author
- License type
- If your codemod is private
Explore the generated project
An example Codemod package:Check out the Codemod package structure for more details.
You can combine different codemod types in a single package. The
scripts/ and rules/ folders are conventional, not required—use any paths you prefer as long as you reference them correctly from workflow.yaml.Understand an example workflow
The generated Learn more about building workflows here.
workflow.yaml will differ depending on the codemod type you select:Combined (jssg + yaml + shell + ai)