Commands

This guide will show you how to run different commands using the Grid Intensity CLI.

Listing providers

You can generate a list of all the available providers in the Grid Intensity CLI by running the grid-intensity provider list command. This will generate a table output with the provider name, and related website URL.

grid-intensity provider list

NAME                  URL
CarbonIntensityOrgUK  carbonintensity.org.uk
ElectricityMaps       electricitymaps.com
Ember                 ember-climate.org
WattTime              watttime.org

See also

For more details about the different providers available in the Grid Intensity CLI, see the Providers section.

Get grid intensity data

After you've installed the CLI, you can immediately start getting grid intensity data using the default Ember integration.

grid-intensity --location PT

The command above uses the Ember dataset - the default integration for the Grid Intensity CLI. We have used the --location flag to request data for Portugal (PT).

See also

For more details on getting grid intensity data using the CLI, including how to switch between providers, see the Getting grid intensity for a location tutorial.

Exporting grid intensity data

You will use the Grid Intensity CLI exporter command to start a Prometheus exporter serving carbon intensity metrics.

grid-intensity exporter --location PT

The command above will start a Prometheus exporter that exposes grid intensity data at localhost:8000/metrics. In this example we use the default Ember dataset, and return data for Portugal (PT).

See also

For more details on exporting grid intensity data using the CLI, see the Exporting grid intensity for a location tutorial.