Codemod
A script that rewrites source code automatically, used for upgrades and refactors across many files at once.
A codemod parses the code into a syntax tree, finds a pattern and rewrites it: renaming an API, changing imports, migrating to a new version of a library. Frameworks often ship official codemods with major releases. Unlike search and replace, it understands the structure of the code; unlike a coding agent, it does exactly the same thing every time.
Related terms
- Monorepo: One repository that holds several apps and shared packages, versioned and changed together.
- Technical debt: Shortcuts in code and design that speed up delivery now and make every later change slower until they are paid back.
- Coding agent: An agent that reads a repository, edits files, runs commands and tests, and opens pull requests.
