Skip to main content
Early Access - The Dcycle CLI is currently available for enterprise customers. Contact us to learn more about access.

Overview

Widgets are data visualizations on a project’s dashboard. Each widget is a pivot table or chart that slices emissions data by dimensions (rows/columns), aggregates measures, and applies filters. The CLI lets you create, configure, and query widgets programmatically.

Available Commands


List Widgets

Output:

Flags


Show Widget

View a widget’s details and configuration:
Output:

Flags


Create Widget

Create a widget in a project dashboard. Provide the full config as a JSON file, or build a pivot widget from flags:

From Flags

From Config File

Flags

Widget Types

Measure Format

Measures are specified as id:aggregation[:unit]:

Update Widget

Update a widget’s config, name, or type. Only the flags you pass are changed:
The update command accepts the same flags as create. When using --config, do not combine it with individual config flags (--category, --rows, etc.).

Rename Widget

A shortcut for renaming:

Delete Widget

Output:

Flags

The last widget in a dashboard cannot be deleted — the backend does not allow emptying a dashboard.

Results

Compute a widget’s results the same way the dashboard does:
Output is the calculated pivot tree as JSON.

CSV Export

Export the raw dataset as CSV instead of the calculated tree:

Write to File

Flags

Examples


Catalog

Show available pivot dimensions (hierarchies), measures, and units. Use this to discover valid values for --category, --rows, --columns, and --measure:
Output:

Drill Into a Category

Returns JSON with the category’s available rows, columns, measures, and filters.

Filter Options

List the selectable filter values for a widget’s category (used to build filter add commands):
Returns JSON with available hierarchies and their possible values.

Filters

Add or Replace a Hierarchy Filter

If a filter on the same hierarchy already exists, it is replaced.

Flags

Remove a Hierarchy Filter

Flags

Set Date Range

Replace (or add) the widget’s date filter:

Flags


Intensity Measures

Intensity measures divide an emission measure by an organizational metric (revenue, FTE, m², etc.) to produce emission intensity values.

List Intensity Groups

List the organization’s available intensity metric groups:
Output:

Add Intensity Measure

Flags

Remove Intensity Measure

Flags


Typical Workflows

Create a Dashboard from Scratch

Export Data for Analysis

Add Emission Intensity

Filter by Scope and Facility

Clone a Widget’s Config


Aliases

Next Steps

Projects

Create and manage the projects that contain widgets

Facilities

Manage physical locations used in widget dimensions

Invoices

Manage energy invoices that feed widget data

Custom Emission Factors

Upload factors that influence widget calculations