Pre-commit & Prek
This guide covers how to integrate dbtective with pre-commit hooks using pre-commit or prek.
For details on --only-manifest mode, manifest fallback for catalog rules, and our recommendations for local vs CI/CD usage, see Only Manifest Mode.
Pre-commit Setup
We recommend running with --auto-parse, --only-manifest, and --hide-warnings for pre-commit hooks:
# .pre-commit-config.yaml
repos:
- repo: https://github.com/feliblo/dbtective
rev: v0.3.1
hooks:
- id: dbtective-run
entry: dbtective run
args: [--auto-parse, --only-manifest, --hide-warnings]--auto-parse runs your configured auto_parse_command (e.g. dbt parse, uv run dbt parse) before reading the manifest, so it is always up to date. Configure it in your dbtective config:
# dbtective.yml
config:
auto_parse_command: "dbt parse"dbtective init detects uv and poetry automatically and suggests the right command.
This avoids stale catalog and manifest issues while still catching metadata problems. Eligible catalog rules will automatically fall back to manifest data.