Skip to main content
The Codemod Registry is a centralized repository for discovering, consuming, and distributing Codemod packages. It enables the community to share reusable code transformation tools and allows organizations to maintain private codemods for their internal use. It provides:
  • Package discovery – Search and browse codemods by language, framework, category, and keywords
  • Version management – Semantic versioning with support for version pinning
  • Scoped packages – Organize packages by organization or user scope (e.g., @nodejs/create-require-from-path)
  • Access control – Configure codemod access types: public or private
  • Direct execution – Run packages directly from the registry using npx codemod@next <package-name>

Package Access Types

Package visibility controls discovery in search and listings. Package access controls retrieval and execution. Choose both before publishing; hiding a listing is not an access restriction.

Public Access

Packages with public access can be retrieved and run by anyone who knows the package identifier. They appear in public search results only when visibility is also public. Use cases:
  • Community-shared codemods for open-source projects
  • Framework migration tools for public use
  • Educational or example codemods
Browse publicly listed packages at codemod.com/registry.

Private Access

Packages with private access require authorization, such as ownership, organization membership, or an API key authorized for the package. Confirm your organization’s publishing and execution options with the Codemod team. Use cases:
  • Maintain proprietary codemods for company-specific patterns
  • Share internal codemods across teams
  • Keep sensitive transformations private
  • Enforce organization standards
Access:
  • Requires organization membership (for organization-scoped packages)
  • Packages can be scoped to your organization (e.g., @your-org/internal-codemod)
  • Configured through organization settings in the Codemod app

Reserving an Organization Scope

To publish under your organization’s scope (for example, @your-org/my-codemod), verify control of that organization. In Add Organization, choose either:
  • Connect GitHub for repository integration as well as an organization scope. See Linking Your GitHub Organization.
  • Repository verification for registry-only use without installing the GitHub App. Follow the displayed repository and verification-file instructions, then verify the challenge. Use a public, non-forked, non-archived repository owned by the GitHub organization whose name matches the requested scope.
Registry-only verification does not connect repositories for Campaigns or other repository work. Configure a Git integration separately when you need it.

Discovering Packages

Browse the Registry: Visit the Codemod Registry web interface to browse packages. On a package page, the Needs codemod ≥ 2.0 badge means that the displayed version requires Codemod 2.0 or newer. Open the Source tab to review the package files, including its workflow, before you run it. Search from CLI: Use the codemod search command to find packages:
Learn more about search options in the CLI Reference.

Running Packages from the Registry

Run packages directly from the registry without downloading them first:
When you run a package from the registry, Codemod CLI automatically downloads and caches it locally. Subsequent runs use the cached version for faster execution.
Version Pinning: For reproducible runs in production, always specify an exact version:
Version pinning ensures your codemods behave consistently across different environments and over time. Named distribution tags such as latest and preview point to versions and can move. Use a tag when you want that release channel; use an exact version when you need a reproducible run. Publishers can publish to a named tag with npx codemod@next publish --tag preview. Some Pro packages support a dry-run-only preview in compatible clients. A preview is not permission for full execution. Check the package’s available actions and contact the Codemod team about access; client support and account permissions can differ.

Publishing Packages

Publish your codemods to the registry to share them with others or use them across projects.
Registry settings default to access: public and visibility: public when omitted. Before publishing, inspect the package contents, remove credentials and proprietary fixtures, and set both fields explicitly. Publishing a later latest version cannot change public access or public visibility to private. A later settings change or unpublish operation cannot recall copies others already downloaded.

Publishing Guide

Learn about all publishing methods: interactive login, API keys, and trusted publishers for CI/CD.

Configuring Access and Visibility

For a restricted organization package, include these settings in your codemod.yaml and publish under your verified organization scope:
codemod.yaml
Access levels:
  • public – Anyone can run the codemod
  • private – Retrieval and execution require package authorization, including supported organization and API-key access
Packages may also use pro access. For publishing options and execution access, contact the Codemod team.
Visibility levels:
  • public – Everyone can see the package in search and listings
  • private – Omit the package from public discovery
  • org – List for the package’s organization in organization context
  • user – List for the owner rather than publicly
Non-public visibility alone does not keep a public-access package confidential. Use access: private for proprietary transforms, and verify the intended users or CI keys can access the published package before sharing its identifier with your team.
Learn more about configuring packages.

Using Packages in Workflows

A workflow runs a registry package as one of its steps with codemod(source, { params }). Pin a version with @<version> so the workflow keeps running the package you tested:
workflow.ts
The step’s result is { output }, what the package’s workflow returned. With nobody to ask (--no-interactive, CI), the nested package’s shell, http, agent and pull request steps need --approve, as when you run the package on its own (see Approvals). In a workflow.yaml, the same step is a codemod step:
workflow.yaml
See Tasks for everything a step can run.

Best Practices

Package Naming

  • Use descriptive names that indicate the codemod’s purpose
  • Follow publish validation: ^(@[A-Za-z0-9\-_.]+/)?[A-Za-z0-9\-_]+$ (optional @scope/, then letters, numbers, hyphens, underscores — no dots in the name)
  • For version migrations, hyphenate versions in the id (lib-1-2-to-1-3), never 1.2-to-1.3
  • Include framework/library names when relevant
When to use scoped package names: Use scoped package names (e.g., @your-org/package-name) when:
  • Framework or library maintainers publishing official codemods for your project
  • Organizations or teams publishing multiple related codemods that should be grouped together
  • You want to ensure only your organization can publish codemods with that scope
  • You need better discoverability for codemods from a specific organization or framework
For individual developers or one-off codemods, unscoped package names are usually the best choice.

Versioning

  • Follow semantic versioning (MAJOR.MINOR.PATCH)
  • Increment major version for breaking changes
  • Increment minor version for new features
  • Increment patch version for bug fixes
  • Keep version in sync in both codemod.yaml and package.json
  • Before republishing after any material change (transforms, fixtures, workflow, README, name, or other package metadata), bump the version — do not reuse a published version with different contents

Documentation

  • Write clear descriptions in codemod.yaml
  • Add relevant keywords for discoverability
  • Include examples in your README
  • Document any workflow parameters

Testing

  • Test your codemod thoroughly before publishing
  • Use jssg testing for automated test cases
  • Validate your workflow with npx codemod@next workflow validate
  • Test with real codebases before publishing

Next steps

CLI Reference

Complete command reference for registry operations.

Package Structure

Learn how to create and configure Codemod packages.

Codemod Registry

Browse and discover packages in the web interface.