Introducing an Improved Codemod AI Experience

·2 min read

How can we elevate codemod generation to the next level? This is the question we asked ourselves when creating the codemodAI functionality. Building error-free code transformation logic is not a task that can be easily managed by an LLM agent. Properly defining the problem and constructing intermediate results from which we can develop a final solution is a complex challenge.

We have developed the codemodAI service as a standalone entity capable of utilizing an AI toolchain to create advanced and error-free codemods.

Registered Codemod Studio users can now access this feature by simply providing before/after pairs and clicking the “Autogenerate with Codemod AI” button. Behind the scenes, the snippets are sent to a node.js service, which launches the appropriate Python scripts. As codemod creation involves multiple steps, a WebSocket connection is opened, and updates are sent to the studio. This allows the user to be aware of the different steps involved in generating the final piece of code.

Once a codemod is ready, it is sent to the Studio and automatically pasted into the Codemod Window. The codemod is then automatically run to produce an output. Users can modify the codemod manually in the Codemod Window or with the help of an assistant in the chat.

In the top right corner of the chat window, users can seamlessly switch between different LLM engines for codemod creation and chatting. This integration ensures that users can choose the most suitable engine for each step, enhancing their experience. The chat and codemodAI use different services under the hood, which helps decouple responsibilities in the backend, providing a convenient and user-friendly experience.

You build.
We migrate

Engineers' time matters. Focus on your product while
we help you adopt the cutting-edge stack.

Reach us via email

Send email

Hop on a quick call for a demo

Book a call