@hypermod/cli is the command-line interface for running codemods from local files, npm packages, the Hypermod community registry, and Hypermod.io-powered sources.
It builds on top of jscodeshift and adds workflow features needed for real package migrations:
- Run codemods from local transform files.
- Resolve codemods from npm packages and the community registry.
- Run versioned codemods in sequence.
- Run presets using the same package addressing format.
- Initialize and validate codemod packages.
- Use the same CLI surface for Hypermod.io-powered transforms.
Codemods are designed to do the heavy lifting, but some manual review may still be required after running a migration.
Use npx for the latest version:
npx @hypermod/cli --helpOr install globally:
npm install -g @hypermod/cli
# or
yarn global add @hypermod/clinpx @hypermod/cli --packages react@18.0.0 ./srcnpx @hypermod/cli --sequence --packages @mylib/button@3.0.0 ./srcnpx @hypermod/cli --packages @mylib/button#remove-deprecated-props ./srcnpx @hypermod/cli --transform ./codemods/rename-imports/transform.ts ./srcnpx @hypermod/cli list react @atlaskit/buttonnpx @hypermod/cli init --transform 1.0.0 my-codemod-packagenpx @hypermod/cli validate ./community/my-package- Product and docs: hypermod.io/docs
- Explore codemods: hypermod.io/explore
- Repository: hypermod-community