BI as code, built for people and agents
Define sources, a semantic layer and dashboards in YAML. Develop locally with instant reload, review changes in pull requests, and let an AI agent draft the next chart against the same definitions.
Docs ·
Quick start ·
Build with AI ·
Website ·
Visivo Cloud ·
Discussions
This dashboard is one YAML file: a DuckDB source, three models with metrics and dimensions, a relation, one input, ten insights, ten charts, one dashboard. The borough dropdown re-filters the charts in the browser.
A dashboard in 60 seconds
pip install visivo # Python 3.12+
visivo init --example ev-sales # copies a sample project, starts the dev server, opens the browser
init --example writes a project.visivo.yml, a small DuckDB file and the CSV it came from, then runs visivo serve on http://localhost:8000. The other bundled examples are github-releases and college-football.
Prefer a single binary with no Python? curl -fsSL https://visivo.sh | bash installs one to ~/.visivo/bin (macOS 15+, Linux x86_64, Windows through WSL). To start from your own data, run visivo init and the in-browser wizard walks you through adding a source.
Edit the YAML and save. The dev server recompiles and re-runs what changed, and layout and style edits redraw in the open tab without a reload. No build step.
What a project looks like
Every Visivo project is the same chain of objects: a source you query, models that name a SQL query, a semantic layer of metrics, dimensions and relations on top of those models, insights that pick fields and aggregates to plot, charts that give insights a Plotly layout, and dashboards that lay charts, tables, markdown and inputs out in rows.
sources:
- name: taxi
type: duckdb
database: taxi.duckdb
models:
- name: trips
source: ${ref(taxi)}
sql: SELECT * FROM yellow_trips
metrics:
- name: revenue
expression: SUM(total_amount)
- name: tip_rate
expression: SUM(tip_amount) / SUM(fare_amount)
dimensions:
- name: pickup_week
expression: date_trunc('week', tpep_pickup_datetime)
- name: payment_method
expression: CASE payment_type WHEN 1 THEN 'Credit card' WHEN 2 THEN 'Cash' ELSE 'Other' END
inputs:
- name: payment
type: single-select
options: ["Credit card", "Cash"]
insights:
- name: revenue_by_week
props:
type: scatter
mode: lines
x: ?{ ${ref(trips).pickup_week} }
y: ?{ ${ref(trips).revenue} }
interactions:
- filter: ?{ ${ref(trips).payment_method} = '${ref(payment).value}' }
charts:
- name: revenue_by_week_chart
insights:
- ${ref(revenue_by_week)}
layout:
title:
text: Weekly revenue
dashboards:
- name: Revenue
rows:
- height: compact
items:
- input: ${ref(payment)}
- height: medium
items:
- chart: ${ref(revenue_by_week_chart)}