Quickstart
Build, run and merge a code transformation
This guide will walk you through the process of creating a codemod using the Codegen IDE.
Access the dashboard
https://codegen.sh
This is where you’ll write, test, and run your codemods
Simply click login with Github to create an account. If you haven’t received access yet, please contact your administrator.
Create a New Codemod
Ask an LLM for Help
Ask the LLM-based assistant in the “chat” tab to delete all of your dead functions:
It will compose a codemod for you that looks like this:
Manually Edit your Codemod
Modify the code to include print
statements and skip tests, then click “save”:
Run your codemod
Click the purple “Run” button to run your codemod on your codebase. You will see logs and/or a diff, like so:
Publish a PR
Once you’re satisfied with the output of your codemod, can convert its output to a pull request.
[TODO - talk about GroupBy]
Congratulations! 🎉
You’ve created your first codemod with Codegen.. As you become more comfortable with the API, you can create more complex transformations.
Here are some suggestions for what to explore next:
Was this page helpful?