CLI Reference

Installation

See the README for installation instructions.

Global Options

OptionDescription
--verbose, -vEnable verbose logging output
--help, -hDisplay help information
--version, -VDisplay version

Commands

run

Run dbtective analysis on your dbt project.

Usage: dbtective run [OPTIONS]

Important:

  • Before running manifest-based rules, run dbt compile, dbt build, dbt run or any of the documented commands to ensure manifest.json is up to date.
  • Before running catalog-based rules, run dbt docs generate to ensure catalog.json is available.

Options

OptionShortDefaultDescription
--entry-point <PATH>.Path to dbt project root
--config-file <PATH>-cAuto-detectedPath to dbtective configuration from the entry-point (overrides auto-detection)
--manifest-file <PATH>-mtarget/manifest.jsonPath to dbt manifest.json
--catalog-file <PATH>-gtarget/catalog.jsonPath to dbt catalog.json
--only-manifesttrueRun only manifest rules
--disable-hyperlinksfalseDisable file hyperlinks in the output
--hide-warningsfalseHide warnings from output (only show errors)

Config File Auto-Detection

By default, dbtective automatically searches for configuration files in the following priority order:

  1. dbtective.yml or dbtective.yaml (highest priority)
  2. dbtective.toml
  3. pyproject.toml (lowest priority)

If multiple config files exist, dbtective will use the highest priority one and display a warning. You can override this behavior by explicitly specifying --config-file.

Examples

# Run with defaults (auto-detects config, uses target/manifest.json)
dbtective run

# Run with a specific config file
dbtective run --config-file ./configs/dbtective.toml

# Run with verbose output
dbtective run --verbose

# Run on a specific dbt project
dbtective run --entry-point ./dbt_project

# Run only manifest rules
dbtective run --only-manifest

# Disable hyperlinks in output table
dbtective run --disable-hyperlinks

# Hide warnings, only show errors (useful for CI)
dbtective run --hide-warnings

init

Initialize a new dbtective configuration file in your dbt project.

Usage: dbtective init [OPTIONS]

Options

OptionShortDefaultDescription
--location <PATH>-l.Directory where the config file will be created
--format <FORMAT>-fymlConfig file format: yml, yaml, toml, or pyproject

Examples

# Create dbtective.yml in current directory (default)
dbtective init

# Create dbtective.toml instead
dbtective init --format toml

# Add [tool.dbtective] section to pyproject.toml
dbtective init --format pyproject

# Create config in a specific directory
dbtective init --location ./my_dbt_project

Getting Help