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.4.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
- 11
addsubcommands for extending an existing dbt project: mart, source, snapshot, seed, exposure, macro, pre-commit, ci, model, test, package doctorcommand with 10 project health checks,--fixauto-repair, and--cimodestatuscommand — Rich terminal dashboard showing model counts by layer, test/doc coverage, sources, and packagesupdatecommand — re-apply dbt-forge templates with unified diffs and per-file accept/skip- Custom presets via
--presetflag — YAML files with defaults and locked fields for team standardization add modelauto-detects existing sources from YAML files for staging layer selectionadd testsupports schema tests (column-level in.yml) in addition to data and unit testsadd packagegenerates package-specificvarsindbt_project.yml(e.g., elementary, dbt-project-evaluator)- Optional pre-commit hooks, SQLFluff config,
.editorconfig, and CI templates - Environment config scaffolding:
generate_schema_namemacro and adapter-specific.env.example CODEOWNERSfile generation with mart-based ownership mapping- Curated package registry with 20 dbt packages and known-good version ranges
- Generated
.envsupport so local dbt commands resolveprofiles/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
dbt-forge add pre-commit
dbt-forge add ci github
dbt-forge add model users
dbt-forge add test stg_orders
dbt-forge add package dbt-utils
Run health checks on an existing project:
dbt-forge doctor
dbt-forge doctor --fix
dbt-forge doctor --ci
dbt-forge doctor --check naming-conventions
View project stats and update templates:
dbt-forge status
dbt-forge update --dry-run
dbt-forge update
Manage presets:
dbt-forge preset validate company-standard.yml
dbt-forge init my_project --preset company-standard.yml
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 -m "not integration" # unit tests only (~205 tests)
uv run pytest -m integration -v # integration tests with DuckDB (~32 tests)
uv run pytest # all tests
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 scaffoldingfix: handle missing target directorychore: 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.4.0
python3 scripts/release_assistant.py verify 0.4.0
python3 scripts/release_assistant.py publish 0.4.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
pypiandtestpypi - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbt_forge-0.4.0.tar.gz.
File metadata
- Download URL: dbt_forge-0.4.0.tar.gz
- Upload date:
- Size: 93.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3185f4d82ad42f5bf7d14046ff86375f9a9855a9bd804b83fca2a16012ea3e1
|
|
| MD5 |
100509eec4a1339e73eded2dd497d8a4
|
|
| BLAKE2b-256 |
510e2e918ad11f946386b057cdfeda54a39efcaddc2241aad873b12ae2114c2d
|
Provenance
The following attestation bundles were made for dbt_forge-0.4.0.tar.gz:
Publisher:
release.yml on maroil/dbt-forge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbt_forge-0.4.0.tar.gz -
Subject digest:
c3185f4d82ad42f5bf7d14046ff86375f9a9855a9bd804b83fca2a16012ea3e1 - Sigstore transparency entry: 1063309823
- Sigstore integration time:
-
Permalink:
maroil/dbt-forge@eaf0efa0a84259d5af23a513a6d9127e7d2b271b -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/maroil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eaf0efa0a84259d5af23a513a6d9127e7d2b271b -
Trigger Event:
push
-
Statement type:
File details
Details for the file dbt_forge-0.4.0-py3-none-any.whl.
File metadata
- Download URL: dbt_forge-0.4.0-py3-none-any.whl
- Upload date:
- Size: 95.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f496694b685c0260ec9477e66bd91aee7ff22e42e6af7798f2078176b02af1f
|
|
| MD5 |
57d7b884596eac30ae8decdea9a40f5d
|
|
| BLAKE2b-256 |
fe8c6abe8ec630b3641b1c34588c36cdc40353c6337f4032f802e3e3eebfcbce
|
Provenance
The following attestation bundles were made for dbt_forge-0.4.0-py3-none-any.whl:
Publisher:
release.yml on maroil/dbt-forge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbt_forge-0.4.0-py3-none-any.whl -
Subject digest:
4f496694b685c0260ec9477e66bd91aee7ff22e42e6af7798f2078176b02af1f - Sigstore transparency entry: 1063309868
- Sigstore integration time:
-
Permalink:
maroil/dbt-forge@eaf0efa0a84259d5af23a513a6d9127e7d2b271b -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/maroil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@eaf0efa0a84259d5af23a513a6d9127e7d2b271b -
Trigger Event:
push
-
Statement type: