Deploying Codemods hero banner

Codemod platform allows you to build a wide variety of codemods and easily distribute them to different parts of the platform, such as the Codemod Registry, CLI, and VS Code extension. This allows them to be discovered, shared, and used by the community.

To do so, codemods must follow the required codemod package structure.

There are two ways of scaffolding a new codemod package that follow the required package structure:

Option 1: Initialize using CLI

You can quickly create a codemod package using the Codemod CLI and start developing with supported codemod engines such as: ast-grep, filemod, jscodeshift, ts-morph, or piranha.

To do so, run the following command:

codemod init

To easily scaffold the codemod package, Codemod CLI prompt you to answer a few questions about your codemod. You can use the -y flag to skip the questions and use the default values.

Option 2: Use Codemod Studio

Codemod Studio allows you to easily create codemods with the power of AI. All codemods built and/or exported by Codemod Studio will automatically conform to the package structure required by Codemod platform.