# DAC: dashboard-as-code with YAML/TSX and built-in semantic layer

> DAC is an open-source dashboard-as-code tool from Bruin. Define dashboards in YAML or TSX, version-control them, and serve via a CLI with a built-in semantic layer.

Published: 2026-05-03
URL: https://daniliants.com/insights/dac-dashboard-as-code-yaml-tsx/
Tags: dashboard-as-code, bruin, semantic-layer, yaml, tsx, agents, sql, data-viz

---

## Summary

DAC is an open-source dashboard-as-code tool from Bruin that lets you define dashboards in YAML or TSX, version-control them, and serve them via a CLI. It includes a built-in semantic layer (define metrics/dimensions once, reference everywhere) and is explicitly designed so AI agents can produce reviewable, standardized dashboards instead of clicking around BI tools.

## Key Insight

- Replaces Looker/Metabase-style dashboard editing with text files an LLM can write and a human can diff in PR
- Two interchangeable formats: YAML (declarative, agent-friendly) and TSX (React-flavored, supports loops, conditionals, dynamic charts)
- Semantic layer in `semantic/` decouples business definitions from queries, no more "which revenue figure is right" across dashboards
- Pipes through Bruin CLI for query execution, so connections (Postgres, BigQuery, Snowflake, Redshift, Databricks, MySQL) are reused not reconfigured
- Ships a Claude/Codex skill (`.claude/skills/create-dashboard/SKILL.md`) on `dac init`, agent gets the schema and authoring rules baked in
- AGPL-3.0 licensed (relevant if embedding into commercial product)
- Telemetry is opt-out via `DO_NOT_TRACK=1`, no SQL/results/connection data collected
- Direct relevance for client reporting workflows: dashboards become reviewable artifacts, not screenshots; junior team members can ship dashboards via Claude Code without needing Looker access