{"id":42221212,"url":"https://github.com/dash0hq/dash0-cli","last_synced_at":"2026-04-01T18:35:26.967Z","repository":{"id":334280490,"uuid":"945577746","full_name":"dash0hq/dash0-cli","owner":"dash0hq","description":"Command line utility to interact with Dash0","archived":false,"fork":false,"pushed_at":"2026-03-31T14:32:09.000Z","size":650,"stargazers_count":10,"open_issues_count":16,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-31T16:29:48.722Z","etag":null,"topics":["cli","observability"],"latest_commit_sha":null,"homepage":"https://www.dash0.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dash0hq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-03-09T18:40:19.000Z","updated_at":"2026-03-31T14:34:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dash0hq/dash0-cli","commit_stats":null,"previous_names":["dash0hq/dash0-cli"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/dash0hq/dash0-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dash0hq%2Fdash0-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dash0hq%2Fdash0-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dash0hq%2Fdash0-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dash0hq%2Fdash0-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dash0hq","download_url":"https://codeload.github.com/dash0hq/dash0-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dash0hq%2Fdash0-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","observability"],"created_at":"2026-01-27T02:09:40.964Z","updated_at":"2026-04-01T18:35:26.958Z","avatar_url":"https://github.com/dash0hq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dash0 CLI\n\nA command-line interface designed for humans, agentic AIs and CI/CD to interact with the [Dash0](https://www.dash0.com) observability platform.\n\n## An ergonomic CLI for agentic AI\n\nThe `dash0` CLI is designed to be driven by AI coding agents as naturally as by humans.\nIts capabilities are discoverable via `--help`, alongside a comprehensive [command reference](docs/commands.md) with detailed flags, expected outputs, and ready-to-use workflow examples.\nAuthentication and connection settings can be configured entirely through profiles and environment variables, avoiding the need to pass secrets as command-line arguments.\nCommands use consistent naming conventions and flags.\nStructured and parseable output formats (`--output json`, `--output yaml`, `--output csv`).\n[Agent mode](#agent-mode) makes all of this automatic: JSON output, structured help, JSON errors, no prompts, and no colors — with zero configuration.\n\n## Installation\n\n### Homebrew (macOS and Linux)\n\n```bash\nbrew tap dash0hq/dash0-cli https://github.com/dash0hq/dash0-cli\nbrew install dash0\n```\n\n### GitHub Releases\n\nDownload pre-built binaries for your platform from the [releases page](https://github.com/dash0hq/dash0-cli/releases).\nArchives are available for Linux, macOS and Windows across multiple architectures.\n\n### GitHub Actions\n\n#### Setup Action\n\nUse the `dash0` CLI in your CI/CD workflows with the [setup](.github/actions/setup/action.yaml) action:\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n\n  - name: Setup Dash0 CLI\n    uses: dash0hq/dash0-cli/.github/actions/setup@main  # You can use any git ref: @main, @v1.1.0, or @commit-sha\n    # with:\n    #   version: '1.1.0' # 1.1.0 is the earliest supported version\n\n  - name: List dashboards\n    env:\n      DASH0_API_URL: ... # Find this at https://app.dash0.com/goto/settings/endpoints?endpoint_type=api_http\n      DASH0_OTLP_URL: ... # Find this https://app.dash0.com/goto/settings/endpoints?endpoint_type=otlp_http\n      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!\n      DASH0_DATASET: my-dataset # Leave empty for the `default` dataset\n    run: dash0 dashboards list\n```\n\n#### Send Log Event Action\n\nThe [`send-log-event`](.github/actions/send-log-event/action.yaml) action sends [log events](https://opentelemetry.io/docs/specs/otel/logs/data-model/#events) to Dash0 directly from your workflows.\nIt is standalone: it installs the Dash0 CLI automatically if it is not already on `PATH`.\nIf the [`setup`](#setup-action) action has already run in the same job, the existing installation is reused.\n\nWhen used on its own, pass `otlp-url` and `auth-token` directly:\n\n```yaml\nsteps:\n  - name: Send deployment event\n    uses: dash0hq/dash0-cli/.github/actions/send-log-event@main\n    with:\n      otlp-url: ${{ vars.DASH0_OTLP_URL }}\n      auth-token: ${{ secrets.DASH0_AUTH_TOKEN }}\n      event-name: dash0.deployment\n      body: 'Deployment completed'\n      severity-number: '9'\n      service-name: my-service\n      deployment-environment-name: production\n      deployment-status: succeeded\n```\n\nWhen the `setup` action has already created a profile, the connection parameters are inherited and do not need to be repeated:\n\n```yaml\nsteps:\n  - name: Setup Dash0 CLI\n    uses: dash0hq/dash0-cli/.github/actions/setup@main\n    with:\n      otlp-url: ${{ vars.DASH0_OTLP_URL }}\n      auth-token: ${{ secrets.DASH0_AUTH_TOKEN }}\n\n  - name: Send deployment event\n    uses: dash0hq/dash0-cli/.github/actions/send-log-event@main\n    with:\n      event-name: dash0.deployment\n      body: 'Deployment completed'\n      severity-number: '9'\n      service-name: my-service\n      deployment-environment-name: production\n      deployment-status: succeeded\n```\n\n### Docker\n\n```bash\ndocker run ghcr.io/dash0hq/cli:latest [command]\n```\n\nMulti-architecture images (`linux/amd64`, `linux/arm64`) are published to GitHub Container Registry.\n\n### From Source\n\nRequires Go 1.22 or higher.\n\n```bash\ngit clone https://github.com/dash0hq/dash0-cli.git\ncd dash0-cli\nmake install\n```\n\n## Usage\n\nFor the full command reference with detailed flags, output examples, and AI-agent workflows, see [docs/commands.md](docs/commands.md).\n\n### Configuration\n\nThe CLI resolves connection settings from profiles stored on disk, [environment variables](#common-settings), and CLI flags, in that order.\nProfiles are the recommended way to manage credentials locally; environment variables are convenient for CI/CD and agentic workflows.\n\n#### Profiles\n\nConfigure API access using profiles.\nAll profile fields are optional at creation time.\nMissing values can be supplied later via `config profiles update` or overridden at runtime with [environment variables or CLI flags](#common-settings).\n\n```bash\ndash0 config profiles create dev \\\n    --api-url https://api.us-west-2.aws.dash0.com \\\n    --otlp-url https://ingress.us-west-2.aws.dash0.com \\\n    --auth-token auth_xxx\n\ndash0 config profiles list\ndash0 config profiles select prod\ndash0 config show\n```\n\nYou can find the API endpoint for your organization on the [Endpoints](https://app.dash0.com/settings/endpoints) page, under the `API` entry, and the OTLP HTTP endpoint under the `OTLP via HTTP` entry.\nCurrently only HTTP OTLP endpoints are supported.\n\n#### Configuration storage\n\nProfiles and the active-profile selection are stored on disk in `~/.dash0/`:\n\n| File | Content |\n|------|---------|\n| `profiles.json` | All configured profiles (name, URLs, auth token, dataset) |\n| `activeProfile` | Name of the currently active profile |\n\nThe directory is created automatically when you create your first profile.\n\nTo store configuration elsewhere, set the `DASH0_CONFIG_DIR` environment variable:\n\n```bash\nexport DASH0_CONFIG_DIR=~/.local/dash0\ndash0 config profiles create dev --api-url https://api.us-west-2.aws.dash0.com\n```\n\n### Agent mode\n\nAgent mode optimizes every aspect of the CLI for machine consumption.\nEnable it explicitly with `--agent-mode` or `DASH0_AGENT_MODE=true`, or let it auto-activate when a known AI agent environment variable is detected:\n\n| Agent | Environment variables |\n|-------|----------------------|\n| [Aider](https://aider.chat/) | `AIDER` |\n| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `CLAUDE_CODE`, `CLAUDECODE` |\n| [Cline](https://cline.bot/) | `CLINE`, `CLINE_TASK_ID` |\n| [Cursor](https://www.cursor.com/) | `CURSOR_AGENT`, `CURSOR_SESSION_ID` |\n| [GitHub Copilot](https://github.com/features/copilot) | `GITHUB_COPILOT` |\n| [MCP](https://modelcontextprotocol.io/) servers | `MCP_SESSION_ID` |\n| [OpenAI Codex](https://openai.com/index/introducing-codex/) | `CODEX`, `OPENAI_CODEX` |\n| [Windsurf](https://windsurf.com/) | `WINDSURF_AGENT`, `WINDSURF_SESSION_ID` |\n\nWhen agent mode is active, the CLI:\n\n- **Defaults output to JSON** — all data retrieval commands (`list`, `get`, `query`, `config show`, `metrics instant`) output JSON instead of tables, without needing `-o json`.\n- **Returns `--help` as structured JSON** — flags, subcommands, aliases, and metadata are machine-parseable.\n- **Emits errors as JSON on stderr** — `{\"error\": \"...\", \"hint\": \"...\"}` instead of colored text.\n- **Skips confirmation prompts** — destructive operations (`delete`, `remove`) proceed without asking, equivalent to `--force`.\n- **Disables colored output** — no ANSI escape codes in any output.\n\nTo explicitly disable agent mode (for example, when running inside an agent environment but wanting human-readable output), set `DASH0_AGENT_MODE=0` or `DASH0_AGENT_MODE=false`.\nThis overrides all other activation methods.\n\nSee the [agent mode specification](docs/commands.md#agent-mode) for the full priority order and details.\n\n### Applying assets\n\nApply asset definitions from a file, directory, or stdin.\nThe input may contain multiple YAML documents separated by `---`.\nSupported asset types: `Dashboard`, `PersesDashboard`, `CheckRule`, `SyntheticCheck`, and `View`.\n\n```bash\ndash0 apply -f assets.yaml\ndash0 apply -f dashboards/\ncat assets.yaml | dash0 apply -f -\ndash0 apply -f assets.yaml --dry-run\n```\n\n**Note:** In Dash0, dashboards, views, synthetic checks and check rules are called \"assets\", rather than the more common \"resources\".\nThe reason for this is that the word \"resource\" is overloaded in OpenTelemetry, where it describes \"where telemetry comes from\".\n\n### Dashboards\n\n```bash\ndash0 dashboards list\ndash0 dashboards get \u003cid\u003e\ndash0 dashboards get \u003cid\u003e -o yaml\ndash0 dashboards create -f dashboard.yaml\ndash0 dashboards create -f persesdashboard.yaml\ndash0 dashboards update [id] -f dashboard.yaml\ndash0 dashboards delete \u003cid\u003e [--force]\n```\n\n### Check rules\n\n```bash\ndash0 check-rules list\ndash0 check-rules get \u003cid\u003e\ndash0 check-rules get \u003cid\u003e -o yaml\ndash0 check-rules create -f rule.yaml\ndash0 check-rules create -f prometheus-rules.yaml\ndash0 check-rules update [id] -f rule.yaml\ndash0 check-rules delete \u003cid\u003e [--force]\n```\n\nBoth `apply` and `dashboards create` also accept PersesDashboard CRD files.\nBoth `apply` and `check-rules create` also accept PrometheusRule CRD files.\n\n### Synthetic checks\n\n```bash\ndash0 synthetic-checks list\ndash0 synthetic-checks get \u003cid\u003e\ndash0 synthetic-checks get \u003cid\u003e -o yaml\ndash0 synthetic-checks create -f check.yaml\ndash0 synthetic-checks update [id] -f check.yaml\ndash0 synthetic-checks delete \u003cid\u003e [--force]\n```\n\n### Views\n\n```bash\ndash0 views list\ndash0 views get \u003cid\u003e\ndash0 views get \u003cid\u003e -o yaml\ndash0 views create -f view.yaml\ndash0 views update [id] -f view.yaml\ndash0 views delete \u003cid\u003e [--force]\n```\n\n### Logging\n\n#### Sending logs to Dash0\n\n\u003e [!NOTE]\n\u003e 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.\n\n```bash\ndash0 logs send \"Application started\" \\\n    --resource-attribute service.name=my-service \\\n    --log-attribute user.id=12345 \\\n    --severity-text INFO --severity-number 9\n```\n\n#### Querying logs from Dash0\n\n\u003e [!WARNING]\n\u003e This command is **experimental** and requires the `--experimental` (or `-X`) flag.\n\u003e The command syntax — especially the `--filter` format — may change in future releases.\n\n\u003e [!NOTE]\n\u003e The `dash0 logs query` command requires an API URL and auth token configured in the active profile, or via flags or environment variables.\n\n```bash\ndash0 -X logs query\ndash0 -X logs query --from now-1h --to now --limit 100\ndash0 -X logs query --filter \"service.name is my-service\"\ndash0 -X logs query --filter \"otel.log.severity.range is_one_of ERROR WARN\"\ndash0 -X logs query --filter '[{\"key\":\"service.name\",\"operator\":\"is\",\"value\":\"api\"}]'\ndash0 -X logs query -o csv\ndash0 -X logs query --column time --column service.name --column body\n```\n\nThe `--filter` flag also accepts JSON filter criteria copied from the Dash0 UI.\nSee the [filter syntax reference](docs/commands.md#filter-syntax) for the full list of operators.\n\n### Tracing\n\n#### Sending spans to Dash0\n\n\u003e [!WARNING]\n\u003e This command is **experimental** and requires the `--experimental` (or `-X`) flag.\n\n\u003e [!NOTE]\n\u003e The `dash0 spans send` command requires an OTLP URL configured in the active profile, or via the `--otlp-url` flag or the `DASH0_OTLP_URL` environment variable.\n\n```bash\ndash0 -X spans send --name \"GET /api/users\" \\\n    --kind SERVER --status-code OK --duration 100ms \\\n    --resource-attribute service.name=my-service\n```\n\n#### Querying spans from Dash0\n\n\u003e [!WARNING]\n\u003e This command is **experimental** and requires the `--experimental` (or `-X`) flag.\n\n\u003e [!NOTE]\n\u003e The `dash0 spans query` command requires an API URL and auth token configured in the active profile, or via flags or environment variables.\n\n```bash\ndash0 -X spans query\ndash0 -X spans query --from now-1h --to now --limit 100\ndash0 -X spans query --filter \"service.name is my-service\"\ndash0 -X spans query --filter \"otel.span.status.code is ERROR\"\ndash0 -X spans query --filter '[{\"key\":\"service.name\",\"operator\":\"is\",\"value\":\"api\"}]'\ndash0 -X spans query -o csv\ndash0 -X spans query --column otel.span.start_time --column otel.span.duration --column \"span name\" --column http.request.method\n```\n\nSee the [filter syntax reference](docs/commands.md#filter-syntax) for the full list of operators.\n\n#### Getting a trace from Dash0\n\n\u003e [!WARNING]\n\u003e This command is **experimental** and requires the `--experimental` (or `-X`) flag.\n\n\u003e [!NOTE]\n\u003e The `dash0 traces get` command requires an API URL and auth token configured in the active profile, or via flags or environment variables.\n\n```bash\ndash0 -X traces get \u003ctrace-id\u003e\ndash0 -X traces get \u003ctrace-id\u003e --from now-2h\ndash0 -X traces get \u003ctrace-id\u003e --follow-span-links\ndash0 -X traces get \u003ctrace-id\u003e -o json\ndash0 -X traces get \u003ctrace-id\u003e --column otel.span.start_time --column otel.span.duration --column \"span name\" --column otel.span.status.code\n```\n\n### Metrics\n\n```bash\ndash0 metrics instant --query 'sum(rate(http_requests_total[5m]))'\n```\n\n### Teams (experimental)\n\n```bash\n# List all teams\ndash0 -X teams list\n\n# Get team details (members + accessible assets)\ndash0 -X teams get \u003cid\u003e\n\n# Create a team\ndash0 -X teams create \"Backend Team\" --color-from \"#FF6B6B\" --color-to \"#4ECDC4\"\n\n# Add members to a team\ndash0 -X teams add-members \u003cteam-id\u003e \u003cmember-id-1\u003e \u003cmember-id-2\u003e\n```\n\n### Members (experimental)\n\n```bash\n# List organization members\ndash0 -X members list\n\n# Invite a member (default role: basic_member)\ndash0 -X members invite user@example.com\n\n# Delete a member\ndash0 -X members delete \u003cmember-id\u003e --force\n```\n\n### Common settings\n\n| Flag | Short | Env Variable | Description |\n|------|-------|--------------|-------------|\n| `--agent-mode` | | `DASH0_AGENT_MODE` | Enable agent mode for AI coding agents. Auto-detected when common agent env vars are set. |\n| `--api-url` | | `DASH0_API_URL` | Override API URL from profile. Find yours [here](https://app.dash0.com/goto/settings/endpoints?endpoint_type=api_http). |\n| `--otlp-url` | | `DASH0_OTLP_URL` | Override OTLP URL from profile. Find yours [here](https://app.dash0.com/goto/settings/endpoints?endpoint_type=otlp_http). |\n| `--auth-token` | | `DASH0_AUTH_TOKEN` | Override auth token from profile. Find yours [here](https://app.dash0.com/goto/settings/auth-tokens). |\n| `--color` | | `DASH0_COLOR` | Color mode for output: `semantic` (default) or `none`. Ignored when piping output. |\n| `--dataset` | | `DASH0_DATASET` | Override dataset from profile. Use the `identifier`, not `Name`. |\n| `--experimental` | `-X` | | Enable experimental features (required for commands marked `[experimental]`) |\n| `--file` | `-f` | | Input file path (use `-` for stdin) |\n| `--output` | `-o` | | Output format: `table`, `wide`, `json`, `yaml`, `csv` |\n| | | `DASH0_CONFIG_DIR` | Override the configuration directory (default: `~/.dash0`) |\n\n### Output formats\n\nThe `list` and `get` commands for assets support multiple output formats via `-o`:\n\n- **`table`** (default): Compact view with essential columns (name and ID)\n- **`wide`**: Similar to `table`, with additional columns (dataset, origin, and URL)\n- **`json`**: Full asset data in JSON format\n- **`yaml`**: Full asset data in YAML format\n- **`csv`**: Comma-separated values with the same columns as `wide`, suitable for piping and automation\n\nThe `update` and `apply` commands show a unified diff of changes.\n\nThe `logs query`, `spans query`, and `traces get` commands support a different set of formats via `-o`:\n\n- **`table`** (default): Columnar output (`logs query` shows timestamp, severity, and body; `spans query` shows timestamp, duration, name, status, service, and trace ID; `traces get` shows a hierarchical span tree)\n- **`json`**: Full OTLP/JSON payload\n- **`csv`**: Comma-separated values\n\nIn [agent mode](#agent-mode), all data retrieval commands default to JSON without needing `-o json`.\n\n### Shell completions\n\nEnable tab completion for your shell:\n\n**Bash** (requires `bash-completion`):\n```bash\nsource \u003c(dash0 completion bash)\n# Permanent (macOS): dash0 completion bash \u003e $(brew --prefix)/etc/bash_completion.d/dash0\n```\n\n**Zsh**:\n```bash\nsource \u003c(dash0 completion zsh)\n# Permanent (macOS): dash0 completion zsh \u003e $(brew --prefix)/share/zsh/site-functions/_dash0\n```\n\n**Fish**:\n```bash\ndash0 completion fish | source\n# Permanent: dash0 completion fish \u003e ~/.config/fish/completions/dash0.fish\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development instructions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdash0hq%2Fdash0-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdash0hq%2Fdash0-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdash0hq%2Fdash0-cli/lists"}