Skip to main content

Scaffold production-ready dbt projects with opinionated defaults

Project description

dbt-forge

dbt-forge is a Python CLI for scaffolding opinionated dbt projects with a consistent layout, starter models, adapter-specific profiles, and optional CI / SQLFluff setup. The project is currently in its 0.2.x alpha phase.

Features

  • src/-packaged Python CLI built on Typer and Rich
  • Interactive or default-driven project generation
  • Adapter templates for BigQuery, Snowflake, PostgreSQL, DuckDB, Databricks, Redshift, Trino, and Spark
  • add mart, add source, add snapshot, add seed, add exposure, and add macro commands for extending an existing dbt project
  • Optional starter dbt packages, SQLFluff config, and CI templates
  • Generated .env support so local dbt commands resolve profiles/ consistently

Install

pip install dbt-forge

Or with uv:

uv tool install dbt-forge

Quickstart

dbt-forge init

For a non-interactive scaffold:

dbt-forge init my_dbt_project --defaults

Add components inside an existing dbt project:

dbt-forge add mart finance
dbt-forge add source salesforce
dbt-forge add snapshot orders
dbt-forge add seed dim_country
dbt-forge add exposure weekly_revenue
dbt-forge add macro cents_to_dollars

Supported Python

  • Python 3.11
  • Python 3.12
  • Python 3.13

Local Development

cd cli
uv sync --all-groups
uv run pre-commit install --hook-type commit-msg
uv run ruff check .
uv run pytest
uv build
uvx twine check dist/*

Commit Messages

This repo uses Conventional Commits. Every commit message must start with a type such as:

  • feat: add databricks profile scaffolding
  • fix: handle missing target directory
  • chore: refresh release workflow

The local commit-msg hook enforces this after you run:

uv run pre-commit install --hook-type commit-msg

Release Process

The package publishes from GitHub Actions on v* tags. The website in this repo is supporting docs/marketing and is not a separately versioned release artifact.

From the repository root:

python3 scripts/release_assistant.py prepare 0.2.0
python3 scripts/release_assistant.py verify 0.2.0
python3 scripts/release_assistant.py publish 0.2.0 --confirm

prepare stages the version and changelog updates. verify is the release gate and requires a clean main branch aligned with origin/main. publish dispatches the TestPyPI preflight, waits for manual confirmation, then tags and creates the GitHub Release.

For the detailed checklist and publish prerequisites, see RELEASING.md.

Publishing Setup

  • Public repo: maroil/dbt-forge
  • Configure GitHub environments named pypi and testpypi
  • Register the GitHub repo as a Trusted Publisher in PyPI and TestPyPI

License

MIT. See LICENSE.

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_forge-0.2.0.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

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

dbt_forge-0.2.0-py3-none-any.whl (41.1 kB view details)

Uploaded Python 3

File details

Details for the file dbt_forge-0.2.0.tar.gz.

File metadata

  • Download URL: dbt_forge-0.2.0.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dbt_forge-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a6288eb510e5a974dc880bc33f7287a2ebb6551d8c496ec86fabbddb8cf4848c
MD5 8aa0bbe1e548e0bf0bf564384038a749
BLAKE2b-256 052836cb2edbbbd5defd7e07badce4ba7bd212394e8ce9c19bb414a913e7f651

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_forge-0.2.0.tar.gz:

Publisher: release.yml on maroil/dbt-forge

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_forge-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dbt_forge-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 41.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dbt_forge-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 976f611735f3ad8f93094001b023f9839a6487139d35b1981d0835f0fdb33085
MD5 7ba17d8305be7908627006c10d91b3de
BLAKE2b-256 e683843d61283c502a1d5458e4646814b42afc970b0264a94c4fc8fb4063120f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbt_forge-0.2.0-py3-none-any.whl:

Publisher: release.yml on maroil/dbt-forge

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