dbt-autofix is a CLI tool that automatically fixes deprecations and breaking changes in dbt projects. It scans your dbt models, tests, and configurations and applies transformations to migrate to newer versions of dbt. Current version: 0.20.4, requires Python >=3.10, <3.14. Release cadence is irregular with frequent patch releases.
pip install dbt-autofixVerified import paths — ran on the pinned version, not inferred.
Install the tool, navigate to your dbt project directory, run a dry-run to see changes, then apply fixes.
Run `dbt-autofix --dry-run` before `dbt-autofix --apply`.
Update commands to use `dbt-autofix run` or refer to the new CLI structure. Check `dbt-autofix --help`.
Remove `--config` flags; use `--project-dir` for project path and configure via `profiles.yml`.
Manually review any changes to macros after autofix. Use version control to revert if needed.
Use the CLI directly: `pip install dbt-autofix` then run `dbt-autofix` from the command line. Do not import in Python scripts.
Replace `--apply` with `--write`. Run `dbt-autofix run --help` for current options.
Navigate to your dbt project root (where dbt_project.yml resides) before running dbt-autofix.