A command-line interface designed for humans, agentic AIs and CI/CD to interact with the Dash0 observability platform.
The dash0 CLI's capabilities are discoverable via --help, alongside a comprehensive command reference with detailed flags, expected outputs, and ready-to-use workflow examples.
Authentication and connection settings can be configured entirely through profiles and environment variables, no need to juggle (and risk leaking) secrets in agentic context.
Commands use consistent naming conventions and flags.
Structured and parseable output formats (--output json, --output yaml, --output csv).
Interactive prompts can be skipped with --force.
brew tap dash0hq/dash0-cli https://github.com/dash0hq/dash0-cli
brew install dash0hq/dash0-cli/dash0Download pre-built binaries for your platform from the releases page. Archives are available for Linux, macOS and Windows across multiple architectures.
Use the dash0 CLI in your CI/CD workflows with the setup action:
steps:
- uses: actions/checkout@v4
- name: Setup Dash0 CLI
uses: dash0hq/dash0-cli/.github/actions/setup@main # You can use any git ref: @main, @v1.1.0, or @commit-sha
# with:
# version: '1.1.0' # 1.1.0 is the earliest supported version
- name: List dashboards
env:
DASH0_API_URL: ... # Find this at https://app.dash0.com/goto/settings/endpoints?endpoint_type=api_http
DASH0_OTLP_URL: ... # Find this https://app.dash0.com/goto/settings/endpoints?endpoint_type=otlp_http
DASH0_AUTH_TOKEN: ... # Get one from https://app.dash0.com/goto/settings/auth-tokens?auth_token_id=39d58aa9-b64e-464c-a675-cc3923085d6c ; keep the auth token in a GitHub secret!
DASH0_DATASET: my-dataset # Leave empty for the `default` dataset
run: dash0 dashboards listThe send-log-event action sends log events to Dash0 directly from your workflows.
It is standalone: it installs the Dash0 CLI automatically if it is not already on PATH.
If the setup action has already run in the same job, the existing installation is reused.
When used on its own, pass otlp-url and auth-token directly:
steps:
- name: Send deployment event
uses: dash0hq/dash0-cli/.github/actions/send-log-event@main
with:
otlp-url: ${{ vars.DASH0_OTLP_URL }}
auth-token: ${{ secrets.DASH0_AUTH_TOKEN }}
event-name: dash0.deployment
body: 'Deployment completed'
severity-number: '9'
service-name: my-service
deployment-environment-name: production
deployment-status: succeededWhen the setup action has already created a profile, the connection parameters are inherited and do not need to be repeated:
steps:
- name: Setup Dash0 CLI
uses: dash0hq/dash0-cli/.github/actions/setup@main
with:
otlp-url: ${{ vars.DASH0_OTLP_URL }}
auth-token: ${{ secrets.DASH0_AUTH_TOKEN }}
- name: Send deployment event
uses: dash0hq/dash0-cli/.github/actions/send-log-event@main
with:
event-name: dash0.deployment
body: 'Deployment completed'
severity-number: '9'
service-name: my-service
deployment-environment-name: production
deployment-status: succeededdocker run ghcr.io/dash0hq/cli:latest [command]Multi-architecture images (linux/amd64, linux/arm64) are published to GitHub Container Registry.
Requires Go 1.22 or higher.
git clone https://github.com/dash0hq/dash0-cli.git
cd dash0-cli
make installFor the full command reference with detailed flags, output examples, and AI-agent workflows, see docs/commands.md.
Configure API access using profiles.
All profile fields are optional at creation time.
Missing values can be supplied later via config profiles update or overridden at runtime with environment variables or CLI flags.
dash0 config profiles create dev \
--api-url https://api.us-west-2.aws.dash0.com \
--otlp-url https://ingress.us-west-2.aws.dash0.com \
--auth-token auth_xxx
dash0 config profiles list
dash0 config profiles select prod
dash0 config showYou can find the API endpoint for your organization on the Endpoints page, under the API entry, and the OTLP HTTP endpoint under the OTLP via HTTP entry.
Currently only HTTP OTLP endpoints are supported.
Apply asset definitions from a file, directory, or stdin.
The input may contain multiple YAML documents separated by ---.
Supported asset types: Dashboard, CheckRule, SyntheticCheck, and View.
dash0 apply -f assets.yaml
dash0 apply -f dashboards/
cat assets.yaml | dash0 apply -f -
dash0 apply -f assets.yaml --dry-runNote: In Dash0, dashboards, views, synthetic checks and check rules are called "assets", rather than the more common "resources". The reason for this is that the word "resource" is overloaded in OpenTelemetry, where it describes "where telemetry comes from".
dash0 dashboards list
dash0 dashboards get <id>
dash0 dashboards get <id> -o yaml
dash0 dashboards create -f dashboard.yaml
dash0 dashboards update <id> -f dashboard.yaml
dash0 dashboards delete <id> [--force]dash0 check-rules list
dash0 check-rules get <id>
dash0 check-rules create -f rule.yaml
dash0 check-rules create -f prometheus-rules.yaml
dash0 check-rules update <id> -f rule.yaml
dash0 check-rules delete <id> [--force]Both apply and check-rules create also accept PrometheusRule CRD files.
dash0 synthetic-checks list
dash0 synthetic-checks get <id>
dash0 synthetic-checks create -f check.yaml
dash0 synthetic-checks update <id> -f check.yaml
dash0 synthetic-checks delete <id> [--force]dash0 views list
dash0 views get <id>
dash0 views create -f view.yaml
dash0 views update <id> -f view.yaml
dash0 views delete <id> [--force]Note
The dash0 logs send command requires an OTLP URL configured in the active profile, or via the --otlp-url flag or the DASH0_OTLP_URL environment variable.
dash0 logs send "Application started" \
--resource-attribute service.name=my-service \
--log-attribute user.id=12345 \
--severity-text INFO --severity-number 9Warning
This command is experimental and requires the --experimental (or -X) flag.
The command syntax — especially the --filter format — may change in future releases.
Note
The dash0 logs query command requires an API URL and auth token configured in the active profile, or via flags or environment variables.
dash0 -X logs query
dash0 -X logs query --from now-1h --to now --limit 100
dash0 -X logs query --filter "service.name is my-service"
dash0 -X logs query --filter "otel.log.severity.range is_one_of ERROR WARN"
dash0 -X logs query -o csvSee the filter syntax reference for the full list of operators.
dash0 metrics instant --query 'sum(rate(http_requests_total[5m]))'| Flag | Short | Env Variable | Description |
|---|---|---|---|
--api-url |
DASH0_API_URL |
Override API URL from profile. Find yours here. | |
--otlp-url |
DASH0_OTLP_URL |
Override OTLP URL from profile. Find yours here. | |
--auth-token |
DASH0_AUTH_TOKEN |
Override auth token from profile. Find yours here. | |
--color |
DASH0_COLOR |
Color mode for output: semantic (default) or none. Ignored when piping output. |
|
--dataset |
DASH0_DATASET |
Override dataset from profile. Use the identifier, not Name. |
|
--experimental |
-X |
Enable experimental features (required for commands marked [experimental]) |
|
--file |
-f |
Input file path (use - for stdin) |
|
--output |
-o |
Output format: table, wide, json, yaml |
|
DASH0_CONFIG_DIR |
Override the configuration directory (default: ~/.dash0) |
The list and get commands for assets support multiple output formats via -o:
table(default): Compact view with essential columns (name and ID)wide: Similar totable, with additional columns (dataset, origin, and URL)json: Full asset data in JSON formatyaml: Full asset data in YAML format
The logs query command supports a different set of formats via -o:
table(default): Timestamp, severity, and body columnsotlp-json: Full OTLP JSON payloadcsv: Comma-separated values
Enable tab completion for your shell:
Bash (requires bash-completion):
source <(dash0 completion bash)
# Permanent (macOS): dash0 completion bash > $(brew --prefix)/etc/bash_completion.d/dash0Zsh:
source <(dash0 completion zsh)
# Permanent (macOS): dash0 completion zsh > $(brew --prefix)/share/zsh/site-functions/_dash0Fish:
dash0 completion fish | source
# Permanent: dash0 completion fish > ~/.config/fish/completions/dash0.fishSee CONTRIBUTING.md for development instructions.