-
-
Notifications
You must be signed in to change notification settings - Fork 19
Rebrand to Hypermod and remove in-repo website; update docs links and package READMEs #256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
danieldelcore
merged 2 commits into
main
from
codex/assess-project-and-suggest-improvements
Mar 23, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,80 @@ | ||
| # @hypermod/cli | ||
|
|
||
| To download and run codemods, we provide a CLI tool called @hypermod/cli. | ||
| `@hypermod/cli` is the command-line interface for running codemods from local files, npm packages, the Hypermod community registry, and Hypermod.io-powered sources. | ||
|
|
||
| `@hypermod/cli` is responsible for running the provided transform against your entire codebase. Under the hood, it is a wrapper of jscodeshift's CLI, which provides additional functionality. | ||
| It builds on top of `jscodeshift` and adds workflow features needed for real package migrations: | ||
|
|
||
| - Ability to run community codemods hosted on npm | ||
| - Runs versioned codemods in sequence | ||
| - Always runs the latest version of a codemod | ||
| - The CLI allows you to run transforms either from the the [public registry](https://www.codeshiftcommunity.com/docs/registry) or on your local machine as per the original implementation of jscodeshift | ||
| - 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. | ||
|
|
||
| _Note:_ Codemods are designed to do the heavy lifting, but they may not be perfect, so some manual work may still be required in order to successfully migrate. | ||
| > Codemods are designed to do the heavy lifting, but some manual review may still be required after running a migration. | ||
|
|
||
| [Documentation](https://www.codeshiftcommunity.com/docs/cli) | ||
| ## Install | ||
|
|
||
| Use `npx` for the latest version: | ||
|
|
||
| ```bash | ||
| npx @hypermod/cli --help | ||
| ``` | ||
|
|
||
| Or install globally: | ||
|
|
||
| ```bash | ||
| npm install -g @hypermod/cli | ||
| # or | ||
| yarn global add @hypermod/cli | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Run a package migration | ||
|
|
||
| ```bash | ||
| npx @hypermod/cli --packages react@18.0.0 ./src | ||
| ``` | ||
|
|
||
| ### Run all transforms since a version | ||
|
|
||
| ```bash | ||
| npx @hypermod/cli --sequence --packages @mylib/button@3.0.0 ./src | ||
| ``` | ||
|
|
||
| ### Run a preset | ||
|
|
||
| ```bash | ||
| npx @hypermod/cli --packages @mylib/button#remove-deprecated-props ./src | ||
| ``` | ||
|
|
||
| ### Run a local transform | ||
|
|
||
| ```bash | ||
| npx @hypermod/cli --transform ./codemods/rename-imports/transform.ts ./src | ||
| ``` | ||
|
|
||
| ### List available codemods | ||
|
|
||
| ```bash | ||
| npx @hypermod/cli list react @atlaskit/button | ||
| ``` | ||
|
|
||
| ### Initialize a new codemod package | ||
|
|
||
| ```bash | ||
| npx @hypermod/cli init --transform 1.0.0 my-codemod-package | ||
| ``` | ||
|
|
||
| ### Validate a codemod package | ||
|
|
||
| ```bash | ||
| npx @hypermod/cli validate ./community/my-package | ||
| ``` | ||
|
|
||
| ## Learn more | ||
|
|
||
| - Product and docs: [hypermod.io/docs](https://www.hypermod.io/docs) | ||
| - Explore codemods: [hypermod.io/explore](https://www.hypermod.io/explore) | ||
| - Repository: [hypermod-community](https://github.com/hypermod-io/hypermod-community) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| # @hypermod/utils | ||
|
|
||
| [Documentation](https://www.codeshiftcommunity.com/docs/utils) | ||
| [Documentation](https://www.hypermod.io/docs) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new quick-start example
--packages react@18.0.0will fail in this CLI:packages/cli/src/resolvers/npm.ts:49-60rejects any version that is not present inconfig.transforms, andcommunity/react/src/hypermod.config.js:1-16exposes no versioned transforms forreactat all (only presets). As written, a user following the first README command will get an "Unable to resolve version18.0.0" error instead of a successful migration.Useful? React with 👍 / 👎.