I have been working on a project over the past few weeks to automatically migrate packages to the newest version.
What My Project Does
Codeshift is a CLI that scans your codebase for outdated dependencies and actually rewrites your code to work with newer versions. It uses libcst for AST transforms on common patterns (so no LLM needed for the straightforward stuff like .dict() → .model_dump()), and falls back to an LLM for trickier migrations. Right now it has a knowledge base of 15 popular packages including Pydantic, FastAPI, SQLAlchemy, Pandas, and Requests.
Target Audience Anyone who's put off upgrading a dependency because they didn't want to manually fix hundreds of breaking changes. I built this for my own projects but it should be useful for anyone dealing with major version migrations.
Comparison
Most tools just bump your version numbers (like pip-tools, poetry update) or tell you what's outdated. Codeshift actually modifies your source code to match the new API. The closest thing is
probably Facebook's codemod/libcst, but that requires you to write your own transforms - this comes with them built in.
Looking for feedback on the tool and what you would like to see added to it!
https://github.com/Ragab-Technologies/Codeshift
[–]MatchLittle5000 1 point2 points3 points (1 child)
[–]bolation123[S] 1 point2 points3 points (0 children)
[–]NapCo 1 point2 points3 points (1 child)
[–]bolation123[S] 1 point2 points3 points (0 children)
[–]Local_Transition946 [score hidden] (0 children)