codemod-cli is straightforward - but it's especially made for codemod projects that have multiple transforms. For a single transform, we could/should have a simpler interface for consumers.
Here are three ways to share your codemod with others. The
npx methods require you
npm publish the repo.
Method 1 - global install, using githubusercontent
Easiest method for the developer, especially if you only have one transform and/or if you're not using codemod-cli.
This uses the github-hosted
raw.githubusercontent link to run it, kinda like running it from a gist. Here's an example using
npm install -g jscodeshift