2 min read

Codemod Studio is where developers can create codemods with ease. It’s as simple as providing two code snippets—one representing the code before the transformation and the second representing the expected output. With these snippets, any user can utilize our AI service - codemodAI, which will infer the transformation function from the provided code.

But what if a user wants to create a more complex codemod that can process different types of inputs? As we strive to build the best developer experience, this was a question we needed to address.

After a challenging journey to rebuild the studio's core, we are ready to present new functionality: users can now add as many snippet pairs as needed. This can significantly improve the accuracy of the generated codemod.

Using multiple test cases

To add multiple test cases, you can simply:

  1. Click on the add test case button
  2. Insert the before/after snippet pairs
  3. Run Codemod AI
new multiple before/after snippets feature for codemod studio

By doing so, Codemod AI will now use all of the test cases provided to generate your codemod.

building a codemod with the new multiple test cases feature

Get started

Now, equipped with broader knowledge, we can use codemodAI to prepare more complex codemods. Try the improved Codemod Studio now

Start migrating in seconds

Save days of manual work by running automation recipes to automate framework upgrades, right from your CLI, IDE or web app.

Get started