Technology
Dash0 CLI
The Dash0 CLI provides command-line access to the Dash0 platform for managing dashboards, check rules, signal-to-metrics rules, sampling rules and more.
Overview
Overview
The Dash0 CLI provides command-line access to the Dash0 platform, allowing you
to manage your observability setup directly from the terminal. You log in through your browser with dash0 login, so
you don't need to create an auth token for day-to-day use. CI/CD pipelines and AI agents can still authenticate with a
static auth token. Profiles let you switch between multiple Dash0 organizations.
Use Cases
- Manage dashboards, check rules, synthetic checks, views, signal-to-metrics rules, spam filters and sampling rules as code with CRUD operations and
apply - Send and query logs, spans and traces directly from the terminal
- Automate observability asset management in CI/CD pipelines
- Automate team creation, member invitations and other access control features
Setup
Install
Homebrew
brew install --cask dash0hq/dash0-cli/dash0Docker
docker run ghcr.io/dash0hq/cli:latest [command]GitHub Actions
- uses: dash0hq/dash0-cli/.github/actions/setup@main
with:
version: latestNix
nix profile install github:dash0hq/dash0-cliPre-built Binaries
Download the appropriate package for your operating system and architecture from the GitHub releases page.
Log In
On your workstation, log in through your browser. You don't need to create an auth token:
dash0 login --profile my_profile --api-url {{endpoint_api_http}}dash0 login creates the profile if it doesn't exist yet and opens your browser to complete an OAuth 2.0 flow. You pick
the Dash0 organization during the consent step, and the CLI stores the access and refresh tokens in the profile. Access
tokens refresh automatically from then on, so you only log in again when the refresh token expires or you run
dash0 logout.
To also send telemetry from the terminal or work with a dataset other than default, set the OTLP endpoint and dataset
on the profile:
dash0 config profiles update my_profile \
--otlp-url {{endpoint_otlp_http}} \
--dataset {{dataset}}OAuth tokens are bound to a single organization. If you work with more than one, create a profile per organization, run
dash0 login --profile <name> for each, and switch between them:
dash0 config profiles select my_profileYou can verify the active configuration with:
dash0 config showUse an Auth Token in CI/CD and AI Agents
dash0 login needs a browser and an interactive terminal, so it won't work in CI runners or AI agent sessions. In those
environments, use a static auth token instead and pass the connection
settings as environment variables:
export DASH0_API_URL={{endpoint_api_http}}
export DASH0_OTLP_URL={{endpoint_otlp_http}}
export DASH0_AUTH_TOKEN={{token}}
export DASH0_DATASET={{dataset}}If you'd rather keep the token in a profile, create one with --auth-token:
dash0 config profiles create my_ci_profile \
--api-url {{endpoint_api_http}} \
--otlp-url {{endpoint_otlp_http}} \
--auth-token {{token}} \
--dataset {{dataset}}In GitHub Actions, store the token as a repository secret and never commit it to your workflow files.
Learn More
Consult the Dash0 CLI documentation to learn more about all available commands.