Skip to main content

Productivity, warehous cost and QoL improvements for your dbt development

Project description

dbt-toolbox

A powerful CLI toolkit that supercharges your dbt development workflow with intelligent caching, dependency analysis, and enhanced documentation generation.

🚀 What Makes dbt-toolbox Amazing

Smart Caching & Performance

  • Lightning-fast model parsing with intelligent cache invalidation
  • Persistent Jinja environment caching for instant macro resolution
  • Dependency graph caching for rapid upstream/downstream analysis

Enhanced dbt Commands

  • dt build - Drop-in replacement for dbt build with enhanced output and performance
  • dt run - Drop-in replacement for dbt run with smart execution and caching
  • Target-specific options for environment control
  • Intelligent pre/post processing hooks

Intelligent Documentation

  • dt docs - YAML documentation generator with smart column inheritance
  • Automatically inherits descriptions from upstream models and macros
  • Tracks column changes (additions, removals, reordering) between runs
  • One-click clipboard integration

Dependency Intelligence

  • Lightweight DAG implementation for model and macro relationships
  • Efficient upstream/downstream traversal
  • Node type tracking and statistics
  • Perfect for impact analysis and refactoring

Configuration

  • Multi-source settings hierarchy (env vars > TOML > dbt profiles > defaults)
  • Dynamic dbt profile and target integration
  • Source tracking for all configuration values

🛠️ Installation

# Using uv
uv add dbt-toolbox

# Or install with pip
pip install dbt-toolbox

⚡ Quick Start

# Initialize and explore your project
dt settings                    # View all configuration

# Enhanced dbt commands with caching
dt build                      # Build with intelligent caching
dt run --model +my_model+     # Support for most dbt selection syntax
dt build --target prod        # Build against production target

# Analyze cache and dependencies
dt analyze                    # Analyze all models
dt analyze --model customers+ # Analyze specific model selection

# Generate documentation YAML
dt docs --model customers     # Generate docs for specific model
dt docs -m orders --clipboard # Copy to clipboard

📋 Core Commands

Command Description
dt build Enhanced dbt build with caching and better output
dt run Enhanced dbt run with intelligent execution and caching
dt docs Generate YAML documentation with smart inheritance
dt analyze Analyze cache state and model dependencies without execution
dt clean Clear all cached data with detailed reporting
dt settings Inspect configuration from all sources

🏗️ Key Features

Intelligent Caching System

dbt-toolbox caches parsed models, macros, and Jinja environments in .dbt_toolbox/ directory with smart invalidation based on file changes and project configuration.

Dependency Graph Analysis

Lightweight DAG implementation provides efficient model relationship tracking:

  • Upstream/downstream dependency resolution
  • Node type classification (models, macros, sources)
  • Impact analysis for refactoring

Enhanced CLI Experience

  • Colored output with progress indicators
  • Global options that work across all commands
  • Command shadowing for seamless dbt integration
  • Comprehensive error handling and reporting

Smart Documentation Generation

The dt docs command intelligently inherits column descriptions from:

  • Upstream model columns with matching names
  • Macro parameters that reference the columns
  • Existing schema.yml documentation

📚 Documentation

🧪 Testing Integration

dbt-toolbox includes a testing module for your dbt projects:

from dbt_toolbox.testing import check_column_documentation

def test_model_documentation():
    """Ensure all model columns are documented."""
    result = check_column_documentation()
    if result:
        pytest.fail(result)

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for development setup, coding standards, and contribution guidelines.

📄 License

MIT License - Feel free to use this project in your own work.

🙏 Acknowledgments

Built with modern Python tooling:

  • Typer for the CLI framework
  • SQLGlot for SQL parsing and optimization
  • Jinja2 for template processing
  • yamlium for YAML manipulation and generation
  • uv for dependency management

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt_toolbox-0.3.0.tar.gz (6.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbt_toolbox-0.3.0-py3-none-any.whl (48.5 kB view details)

Uploaded Python 3

File details

Details for the file dbt_toolbox-0.3.0.tar.gz.

File metadata

  • Download URL: dbt_toolbox-0.3.0.tar.gz
  • Upload date:
  • Size: 6.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dbt_toolbox-0.3.0.tar.gz
Algorithm Hash digest
SHA256 73b94c7d50f75d07452fff1cdcfbdb3d30f7f76b792e8eaf571dcd94f9694997
MD5 60fad1b1debe5796e4d28c40514c7b76
BLAKE2b-256 c1c2c7cc700b00e1d1db198d219ae5359f59a1a56dd31fd438ae018379d33026

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_toolbox-0.3.0.tar.gz:

Publisher: release_publish.yml on erikmunkby/dbt-toolbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dbt_toolbox-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: dbt_toolbox-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 48.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dbt_toolbox-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cd25fd9e6fa79db25fba527464f840a8af9ef31b8c0acb4e75a47c469f50e41
MD5 329b6cbeb7109535569babf4b306cbfe
BLAKE2b-256 0dd7066fcd3d77e29d446d97f7d6984017b675135044adaa13a18b5992829350

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_toolbox-0.3.0-py3-none-any.whl:

Publisher: release_publish.yml on erikmunkby/dbt-toolbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page