
Tutorial module
Dashboards as Code with Bruin DAC
Go from an empty folder to a live, AI-editable analytics dashboard on localhost in under twenty minutes. Author dashboards as YAML, query a real DuckDB, and let the in-browser AI assistant build new charts for you.

What
- A live
dac serveinstance onlocalhost:8321backed by your own DuckDB file - A YAML dashboard that queries a real table - metrics, charts, and a region filter
- An in-browser AI assistant that adds new charts from plain-English prompts
How
- Scaffold with
dac init- DAC ships with a starter project, sample data, and an AI skill - Connect DuckDB through
.bruin.yml- the same connection format the Bruin CLI uses - Author dashboards as YAML, validate with
dac validate, then iterate live withdac serve
DAC (Dashboard-as-Code) is Bruin's CLI for building analytics dashboards from text files instead of clicking around a GUI. You define dashboards as YAML or TSX, version-control them like any other code, and serve them locally with live reload. An AI assistant is built into the dev server so you can edit dashboards by chatting with it - no React, no drag-and-drop.
The stack you'll build
- DAC - the CLI, dev server, and AI assistant
- DuckDB - a single-file analytical database that runs locally
- YAML dashboards - declarative widgets, filters, and queries
What you'll be able to do by the end
- Scaffold a DAC project and point it at a DuckDB file you already have
- Author a dashboard with metrics, charts, and filters - all from a few dozen lines of YAML
- Run
dac serveand use the in-browser AI chat to add or modify charts on the fly
Who this is for Data analysts and data scientists who want a code-first dashboard workflow - reviewable in PRs, runnable on a laptop, and friendly to AI agents.
Before you start
- macOS or Linux with a terminal - the installer is a single curl command
- A DuckDB file with at least one table to chart (any
.duckdbyou already have works) - Optional - any LLM API key if you want to drive the in-browser AI chat
- 1Set up your DAC project4 min
- 2Connect your DuckDB4 min
- 3Author your first dashboard8 min
- 4Serve on localhost and chat with the AI5 min
Get help & contribute