Publishing to Codemod Registry
This guide will walk you through the steps needed to publish codemods to Codemod Registry.
There are three ways to publish codemods to Codemod Registry:
- publishing a codemod package
- publishing from source file
- publishing with Codemod Studio (Coming soon)
Publishing codemods to the registry is especially useful for framework/library builders. With features like shareable codemod deep links and Codemod CLI & IDE extenion, your users can adopt your latest releases with one click, straight from your migration doc.
Publishing codemods
Option 1: Publishing a Codemod-compatible package (recommended)
Creating and publishing a Codemod-compatible package brings an enhanced codemod running experience.
Build a codemod package
To publish a codemod to Codemod Registry, the codemod package needs to be compatible with Codemod platform. To learn how to build Codemod-compatible codemods, please refer to the building codemods guide.
Login to Codemod platform
If you are not already logged in, login to Codemod platform using:
Publish codemod
Move to your codemod package directory and run:
Option 2: Publishing a codemod from source file
Login to Codemod platform
If you are not already logged in, login to Codemod platform using:
Publish codemod
Publish the codemod from source path:
To generate a Codemod-compatible package, Codemod CLI will ask you a few questions about your codemod to generate the codemodrc.json
configuration file automatically for you.
Unpublishing codemods
To unpublish a codemod from Codemod Registry, you can use the codemod unpublish
command.
Was this page helpful?