Skip to content

Overview

What are codemods?

A codemod is a function that takes files as input and output. It reads the files of interest, makes some changes, then saves the result to your disk.

One special case is the identity function. That is, not all codemods need to make a change. As a result, linters are a codemod. Tools that gather files, collect metrics, analyze package dependencies, or find vulnerabilities are also one.

In short, codemods are everywhere and you’ve likely used a few already.

What is codemod-utils?

codemod-utils provides a set of tools and conventions to help you write codemods. Use @codemod-utils/cli to get started.

sh
pnpx @codemod-utils/cli <your-codemod-name>

Package overview

Made with codemod-utils

  1. @ember-intl/lint
  2. @ember-intl/vite
  3. analyze-ember-project-dependencies
  4. blueprints-v2-addon
  5. codemod-generate-release-notes
  6. create-v2-addon-repo
  7. ember-codemod-add-component-signatures
  8. ember-codemod-add-missing-tests
  9. ember-codemod-add-template-tags
  10. ember-codemod-css-modules
  11. ember-codemod-ember-render-helpers-to-v1
  12. ember-codemod-pod-to-octane
  13. ember-codemod-remove-ember-css-modules
  14. ember-codemod-remove-global-styles
  15. ember-codemod-remove-inject-as-service
  16. ember-codemod-rename-test-modules
  17. ember-codemod-sort-invocations
  18. ember-codemod-v1-to-v2
  19. prettier-plugin-ember-hbs-tag
  20. type-css-modules
  21. update-workspace-root-version