Meet the Hypermod Editor

A powerful completely in-browser codemod development environment. Enabling your team to create codemods, preview them securely and deploy them to repositories across your organization.

export default function transform(file, { j }) {
  const ast = j(file.source);

  const leftPadImports = ast.find(j.ImportDeclaration, {
    source: { value: "left-pad" },
  });

  const leftPadLocalName = getSpecifierName(
    leftPadImports.find(j.ImportDefaultSpecifier)
  );

  leftPadImports.remove();

  ast
    .find(j.CallExpression, { callee: { name: leftPadLocalName } })
    .forEach((callPath) => {
      const args = callPath.node.arguments;

      if (args.length >= 2) {
        const stringArg = args[0];
        const targetLength = args[1];
        const padString = args.length > 2 ? args[2] : j.literal(" ");

        j(callPath).replaceWith(
          j.callExpression(
            j.memberExpression(stringArg, j.identifier("padStart")),
            [targetLength, padString]
          )
        );
      }
    });

  return ast.toSource();
}

function getSpecifierName(specifiers) {
  if (!specifiers.length) return null;
  return specifiers.nodes()[0].local.name;
}

Input
import leftPad from 'left-pad';

const foo = 'bar';
const baz = 'qux';

leftPad(foo, 5);
leftPad(baz, 5);

Output
loading
Read-only

AI Integration

Leverage AI to generate code codemods for your specific use case.

AST Explorer

Explore and visualize the Abstract Syntax Tree (AST) of your code. Understand how codemods work under the hood.

Terminal

Use the built-in terminal to run commands, install dependencies, and test your codemods in a sandbox environment.

Test mode

Test your codemods in a sandbox environment before deploying them to your repositories. Ensure they work as expected without affecting your codebase.

Repository preview

Preview your codemods against real repositories. See how they would affect your code before deploying them.

GitHub Integration

Seamlessly integrate with GitHub to deploy your codemods as batched pull requests across your organization.

Prompt Mode

Write codemods faster with AI

Prompt Mode helps you generate codemods by analysing the context you provide—such as your README.md, target files, or other project details. Whether you're migrating libraries, refactoring code, or implementing new patterns, Prompt Mode accelerates the process.

Learn more about Prompt ModeTry Prompt Mode
Hypermod Editor Prompt ModeHypermod Editor Prompt Mode
How it works

How the Hypermod Editor works

Get started with the Hypermod Editor in just a few simple steps and start creating codemods.

1

Create a new codemod

Start by creating a new codemod in the Hypermod Editor. You can choose from various templates or start from scratch.
Pull request previewPull request preview
2

Write your codemod

Use the built-in editor to write your codemod code. The editor supports syntax highlighting and code completion.
Pull request previewPull request preview
3

Test with confidence

Run your codemod against a test repository to see how it works. You can preview the changes before applying them.
Pull request previewPull request preview
4

Deploy everywhere

Once you are satisfied with your codemod, deploy it to your repositories using the built-in deployment tools.
Pull request previewPull request preview
Pricing

Simple, transparent pricing

Choose the plan that works best for you. All plans include a 14-day free trial.

Lifetime deal

Lifetime access to all features for a one-time payment. Offer only available during beta.

  • Deploy to private repos
  • AI features
  • Unlimited Codemods
  • Unlimited Repositories
  • Create & share Codemods

$129

One-time payment

Get Lifetime Plan
Community

Our community

Join our community of developers, maintainers, and organizations who are using Hypermod to automate code migrations.

Community first

Learn with others in a supportive community Share your work and get the help you need in the Hypermod Community Discord: an inclusive space to share ideas and explore what‘s possible.

Join our Discord

Secure by design

Your source code never leaves its repository for processing. We instead dispatch requests to GitHub actions / Bitbucket Pipelines which run transformations safely within your repository.

See our security policy

Hypermod-GPT

Hypermod-GPT can be used to assist in generating codemods. It is trained on a large dataset of code and can be used to generate code codemods for your specific use case.

Go to Hypermod-GPTHypermod-GPT AI model for generating codemods.Hypermod-GPT AI model for generating codemods.

Open source

We provide a open source CLI and API to help you build and share codemods with the community. Running local or public tranforms via our CLI is completely free.

Get started with the CLI

Deploy your first codemod in minutes.