Meridian Studio
Unofficial community project. Not affiliated with, endorsed by or sponsored by Google.
Meridian and the Meridian logo are trademarks of Google LLC. Google's own product named Meridian Studio
is at https://developers.google.com/meridian/studio; this extension is unrelated.
Marketing mix models as code. Run Google Meridian from VS Code or Cursor:
datasets, models and budget scenarios are YAML files in your repo, fitted and optimized from the sidebar, tracked
in MLflow.


Getting started
- Open a folder. Click the Meridian icon in the activity bar, then New dataset and pick your weekly CSV.
The YAML opens with the CSV's header in a comment: map its columns to Meridian's roles.
- New model on that dataset:
ModelSpec, priors, sampling. Click ▶ Fit above the file.
- New scenario on that model: a budget, bounds per channel. Click ▶ Optimize.
The first run installs what it needs: uv if missing (after asking; into the
extension's own storage, no PATH change), then Python and Meridian (a few minutes and about 1 GB, once).
Fits run on your machine, on CPU.
What it does
| Sidebar |
Folder |
The YAML says |
▶ runs |
| Datasets |
datasets/ |
a CSV and how Meridian reads it (CsvDataLoader's arguments) |
nothing: a fit reads the CSV |
| Models |
models/ |
the dataset, ModelSpec, priors, sampling |
the fit, logged to MLflow |
| Scenarios |
scenarios/ |
the model, a budget, bounds per channel, or an ROI target |
Meridian's BudgetOptimizer on that fit |
- Completion and errors while you type, from a JSON schema per kind (through the YAML extension, installed
with this one). Columns named in a dataset but absent from its CSV show in red in the tree.
- The tree explains each file: a dataset unfolds into its CSV columns and their roles, unused ones greyed;
a model into its priors per channel and its runs.
- Results beside the editor after each run: R², MAPE, r-hat, divergences, ROI by channel with its interval;
or a scenario's spend before and after. Meridian's own HTML report opens in the editor too (its charts load
Vega from gstatic.com, so they need the network).
- History: every fit appends a line to
<model>.runs.jsonl (when, the configuration, what it found), listed
under the model; click one to see its results again.
- Outdated runs are flagged when a YAML or its CSV changed since. Rename and delete carry a file's run
records along and update the files that name it.
A dataset, for example:
name: synthetic
csv: data/national_media.csv
kpi_type: non_revenue
coord_to_columns:
time: time
kpi: conversions
revenue_per_kpi: revenue_per_conversion
controls: [competitor_activity_score_control, sentiment_score_control]
media: [Channel0_impression, Channel1_impression]
media_spend: [Channel0_spend, Channel1_spend]
media_to_channel: { Channel0_impression: ch0, Channel1_impression: ch1 }
media_spend_to_channel: { Channel0_spend: ch0, Channel1_spend: ch1 }
Settings
| Setting |
Default |
Meaning |
meridian.mlflowTrackingUri |
empty |
Where fits are logged. Empty: mlflow.db and mlruns/ in the project. |
Files
<project>/
data/national_media.csv your CSVs
datasets/synthetic.yaml which CSV, which columns, which channels
models/synthetic-v1.yaml
models/synthetic-v1.result.json the latest fit: quality, ROI per channel, where MLflow put the artifacts
models/synthetic-v1.runs.jsonl every fit, one line each
scenarios/plus-10.yaml
scenarios/plus-10.result.json spend and outcome per channel, before and after
scenarios/plus-10.html Meridian's optimization summary
mlflow.db, mlruns/ the local MLflow store (keep it out of git)
Development
bun install, then F5 opens examples/ with the extension loaded.
bun run test: type check, bundle, the tree's logic, then the runner (fits the example tiny, optimizes it).
bun run build && HOME=$(mktemp -d) PATH=/usr/bin:/bin $(which node) scripts/check-uv.js checks the uv
install (downloads uv).
bun run package builds the .vsix; cursor --install-extension meridian-studio-*.vsix installs it.
License
Apache License 2.0, see LICENSE and NOTICE. Google Meridian is Apache 2.0 and is installed at run time, not
bundled. The icons in media/ reproduce the Meridian logo, a Google trademark, and are not covered by this
license.
| |