Codemod AI Now Supports ts-morph
At Codemod, our mission is to create an exceptional code migration experience for developers worldwide. To meet all code migration needs, we've designed our system to work with various popular, proven, and open-source codemod engines, each with its own strengths and weaknesses.
We are excited to announce that we've added support for the ts-morph engine to Codemod AI, building on the foundation laid out in our previous blog post, where we introduced our iterative approach to codemod generation. ts-morph is a powerful TypeScript manipulation library for programmatic code changes. This expansion empowers developers to tackle codebase modernization challenges using ts-morph alongside jscodeshift.
Our experiments, using our publicly available registry as a test set, show promising results. With vanilla LLM (zero refinement iterations), the accuracy of codemod generation given the before and after code examples is only 26%. However, with just a few refinement iterations, we've seen significant improvements. For example, after four iterations, the accuracy improves to 54%. We used GPT-4o in our experiments.
For context, even the initial 26% success rate, achieved without our iterative AI system, used expert-curated prompts, enhancing the developer experience compared to using ChatGPT/GPT-4o directly.
We hope this update extends our reach to the TypeScript community. While our refinement iterations for ts-morph are currently basic and lack RAG or any advanced optimizations, we are actively working to enhance this process to provide more accurate and efficient solutions.
Join us at Codemod on this journey of innovation with Codemod AI. Your feedback is invaluable as we strive to deliver cutting-edge solutions for code modernization and migration challenges.
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.