> ## Documentation Index
> Fetch the complete documentation index at: https://traceroot.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To set up traceroot in a repository, follow the setup prompt in https://traceroot.ai/docs/getting-started/coding-agents.md.

# Dashboards and Widgets from the Terminal

> Read and change dashboards and widgets with the traceroot CLI

Read your [dashboards](https://traceroot.ai/docs/dashboards/get-started.md) and their data with any credential, and change them with [a browser login](https://traceroot.ai/docs/cli/authentication.md#browser-login-and-api-keys).

## Read dashboards and widgets

```bash theme={null}
traceroot dashboards list
traceroot dashboards get <dashboard-id>
traceroot widgets get <widget-id>
```

There's no `widgets list`. `dashboards get` shows a dashboard's widgets with their IDs. `widgets get` shows one widget as stored: its title, type, spec, display config, and dashboard.

## Read a widget's data

```bash theme={null}
traceroot widgets data <widget-id> --range 7d
traceroot widgets data <widget-id> --start-time <start> --end-time <end>
```

`--range` takes `30m`, `1h`, `3h`, `6h`, `1d`, `7d`, `14d`, `30d`, `60d`, or `90d`. Give it, or both `--start-time` and `--end-time` as ISO 8601 times such as `2026-11-01T00:00:00Z`, or neither for the last 24 hours.

The response's `status` is `ok` with rows, `skipped` for a trace feed or legacy detector widget, or `error` with a reason. Its `window` says what the rows cover, because retention can shorten it. A window that ends before your plan's retention cutoff exits 2.

## Create and change dashboards

```bash theme={null}
traceroot dashboards create --name "Agent latency" --description "LLM latency by model"
traceroot dashboards update <dashboard-id> --name "Model latency"
```

Creating a name that already exists in the project returns that dashboard. `dashboards update` changes the name and description, and the layout can't be changed here. To clear a description, send `{ "description": null }` with `--from-file`.

## Create and change widgets

A widget's `--type` is `query` for a chart, or `trace_feed` for a list of recent traces. Its `--spec` is JSON in the matching form: `view`, `filters`, `metric`, `breakdown`, and `display` for `query`, and `filters` and `limit` for `trace_feed`.

An existing widget of the same type is the best model. Read its stored spec, edit it, and pass it back:

```bash theme={null}
traceroot widgets get <widget-id> --json | jq '{spec}' > widget.json
traceroot widgets create --dashboard-id <dashboard-id> --title "Latency by model" --type query --from-file widget.json
traceroot widgets update <widget-id> --from-file widget.json
```

Every `widgets create` adds a new widget. On `widgets update`, a spec replaces the whole spec and must be in the widget's form, because the type can't change. To change `display_config` on an update, send it with `--from-file`; `null` resets it.

## Delete widgets and dashboards

```bash theme={null}
traceroot widgets delete <widget-id> --reason "Duplicate of the latency chart"
traceroot dashboards delete <dashboard-id> --reason "Replaced by the latency dashboard"
```

Each delete needs a [`--reason`](https://traceroot.ai/docs/cli/scripting#shared-flags). Deleting a dashboard deletes its widgets. A project's last dashboard can't be deleted, and trying exits 1.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.