# dbt Charts

> Declarative YAML syntax around SQL for building dashboards and reports that agents can write and humans can audit.

dbt Charts, from dbt Labs, is a declarative YAML syntax wrapped around SQL for building dashboards as code. The `dbt-charts` Python package and its `dct` CLI compile board definitions into interactive dashboards and reports. The project is in beta (pre-1.0) and requires Python 3.11 to 3.13. The GitHub repository is a read-only mirror of a private upstream.

## What It Is

dbt Charts is a dashboards-as-code language and toolchain. SQL defines what data to show, and YAML declares how to show it: queries, charts, layout, variables, and explanatory text live in one file. The README frames it as a response to vibe-coded dashboards that leave hard-to-audit artifacts, offering a syntax that agents can write and humans can review.

## How the Workflow Works

A board's YAML is compiled (validated, theme and layout resolved), its SQL is executed against a warehouse through dbt adapters, and the results are rendered through Vega-Lite specs. Output goes to a live preview via `dct serve`, or to HTML, PDF, PNG, SVG, JSON, and terminal via `dct render`. Other CLI verbs validate boards without a warehouse, run raw or named queries, search boards, trace which boards reference a column, and show built-in YAML docs and bundled examples. A browser Playground is available for trying boards without installing anything.

## Data Sources, Charts and Themes

Local sources include CSV, Parquet, JSON and DuckDB. Warehouses include Athena, BigQuery, ClickHouse, Databricks, PostgreSQL, Redshift, Snowflake, Spark and Trino, each installed as an extra. The language has 16 core chart types, such as bar, line, area, scatter, heatmap, KPI, table and maps, plus composed shapes like funnels, slope charts and small multiples. Five built-in themes are selectable with one key, and custom themes can extend them.

## Agents, dbt and CI

The CLI bundles skills for coding agents (`dct skills intro`) and a local MCP server that can be wired into Cursor, VS Code, Claude Desktop, Codex and others. Inside a dbt project, boards can query models with `ref()` and reuse the dbt profile for connections. `dct init ci` writes a GitHub Actions workflow that validates boards on pull requests, and validation messages include codes, file and line, and suggested fixes. A VS Code extension, also on Open VSX, provides highlighting, autocomplete, diagnostics and live preview. dbt Labs also offers a hosted dbtcharts.com platform for conversational analytics and sharing.

## Features
- Declarative YAML syntax around SQL for dashboards
- dct CLI: validate, serve, render, query, search, impact, docs, examples
- Render to HTML, PDF, PNG, SVG, JSON and terminal
- 16 core chart types plus semantic chart shapes
- 5 built-in themes and custom themes
- Variables and filters
- Offline validation with actionable error codes
- GitHub Actions CI workflow generation
- Bundled agent skills and local MCP server
- VS Code extension with live preview
- Column impact analysis across boards
- Browser Playground

## Integrations
dbt, DuckDB, BigQuery, Snowflake, Databricks, PostgreSQL, Redshift, Athena, ClickHouse, Spark, Trino, VS Code, Cursor, Claude Desktop, Codex, Windsurf, GitHub Actions

## Platforms
WEB, API, VSC_EXTENSION, CLI

## Pricing
Open Source

## Version
0.9.1

## Links
- Website: https://www.getdbt.com/product/dbtcharts
- Documentation: https://docs.dbtcharts.com/
- Repository: https://github.com/dbt-labs/dbt-charts
- EveryDev.ai: https://www.everydev.ai/tools/dbt-charts
