Skip to content
Back to search

dtctl

CLI for managing Dynatrace platform resources - built for humans and AI agents

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/dynatrace/dtctl with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/dynatrace/dtctl'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dynatrace--dtctl/badge.svg)](/listings/dynatrace--dtctl)

HTML

<a href="/listings/dynatrace--dtctl"><img src="/api/listings/dynatrace--dtctl/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

# Homebrew (macOS/Linux)
brew install dynatrace-oss/tap/dtctl
# Shell script (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/dynatrace-oss/dtctl/main/install.sh | sh
# PowerShell (Windows)
irm https://raw.githubusercontent.com/dynatrace-oss/dtctl/main/install.ps1 | iex

Binary downloads, building from source, shell completion setup, and more in the **[Installation Guide](docs/INSTALLATION.md)**.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 161 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # dtctl
  2. [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Dynatrace/dtctl/badge)](https://scorecard.dev/viewer/?uri=github.com/Dynatrace/dtctl)
  3. [![Release](https://img.shields.io/github/v/release/Dynatrace/dtctl?style=flat-square)](https://github.com/Dynatrace/dtctl/releases/latest)
  4. [![Build Status](https://img.shields.io/github/actions/workflow/status/Dynatrace/dtctl/build.yml?branch=main&style=flat-square)](https://github.com/Dynatrace/dtctl/actions)
  5. [![Go Report Card](https://goreportcard.com/badge/github.com/Dynatrace/dtctl?style=flat-square)](https://goreportcard.com/report/github.com/Dynatrace/dtctl)
  6. [![License](https://img.shields.io/github/license/Dynatrace/dtctl?style=flat-square)](LICENSE)
  7. [![Go Version](https://img.shields.io/github/go-mod/go-version/Dynatrace/dtctl?style=flat-square)](go.mod)
  8. **Your Dynatrace platform, one command away.**
  9. `dtctl` is a CLI for **Dynatrace SaaS**. Manage workflows, dashboards, queries, and more from your terminal or let AI agents do it for you. Its predictable verb-noun syntax (inspired by `kubectl`) makes it easy for both humans and AI agents to operate.
  10. > Looking for something else? [dtmgd](https://github.com/dynatrace-oss/dtmgd) covers Dynatrace Managed, and [dtwiz](https://github.com/dynatrace-oss/dtwiz) helps with Dynatrace setup and onboarding.
  11. ```bash
  12. dtctl get workflows # List all workflows
  13. dtctl query "fetch logs | limit 10" # Run DQL queries
  14. dtctl apply -f workflow.yaml --set env=prod # Declarative configuration
  15. dtctl get dashboards -o json # Structured output for automation
  16. dtctl exec copilot nl2dql "error logs from last hour"
  17. ```
  18. ![dtctl dashboard workflow demo](docs/assets/dtctl-1.gif)
  19. > **Active Development**: dtctl has stabilized considerably, but some commands and flags are still `experimental` or `development` tier (see [Stability](docs/STABILITY.md)). If you encounter any bugs or issues, please [file a GitHub issue](https://github.com/Dynatrace/dtctl/issues/new). Contributions and feedback are welcome!
  20. **[Documentation](docs/README.md)** · **[Installation](docs/INSTALLATION.md)** · **[Quick Start](docs/QUICK_START.md)** · **[Command Reference](docs/COMMANDS.md)**
  21. ---
  22. ## Install
  23. ```bash
  24. # Homebrew (macOS/Linux)
  25. brew install dynatrace-oss/tap/dtctl
  26. ```
  27. ```bash
  28. # Shell script (macOS/Linux)
  29. curl -fsSL https://raw.githubusercontent.com/Dynatrace/dtctl/main/install.sh | sh
  30. ```
  31. ```powershell
  32. # PowerShell (Windows)
  33. irm https://raw.githubusercontent.com/Dynatrace/dtctl/main/install.ps1 | iex
  34. ```
  35. Binary downloads, building from source, shell completion setup, and more in the **[Installation Guide](docs/INSTALLATION.md)**.
  36. ## Authenticate
  37. ```bash
  38. # OAuth login (recommended, no token management needed)
  39. dtctl auth login --context my-env --environment "https://abc12345.apps.dynatrace.com"
  40. # Verify everything works
  41. dtctl doctor
  42. ```
  43. Token-based authentication and multi-environment configuration are covered in the **[Quick Start](docs/QUICK_START.md)**.
  44. ## Why dtctl?
  45. - **Familiar CLI conventions**: `get`, `describe`, `edit`, `apply`, `delete`. If you (or your AI) know `kubectl`, you already know dtctl.
  46. - **Built for AI agents**: Structured output (`--agent`), machine-readable command catalog (`dtctl commands`), environment data discovery (`dtctl inventory`), and a bundled [Agent Skill](https://agentskills.io) that teaches AI assistants how to operate Dynatrace
  47. - **Multi-environment**: Switch between dev/staging/prod with a single command; safety levels prevent accidental changes
  48. - **Watch mode**: Real-time monitoring with `--watch` for all resources
  49. - **DQL passthrough**: Execute queries directly, with template variables and file-based input
  50. - **Embeddable**: `dtctl serve http` (development-tier, opt in with `dtctl config set development.serve on`) or `pkg/engine` in Go runs the same command surface in-process for services and Workflow actions — multi-tenant per request, no host config, output byte-identical to the CLI
  51. - **[NO_COLOR](https://no-color.org/) support**: Respects `NO_COLOR`, `FORCE_COLOR=1`, and auto-detects TTY
  52. ## Supported Resources
  53. | Resource | Operations |
  54. |----------|------------|
  55. | Workflows | get, describe, create, edit, delete, apply, execute, logs, history, restore, diff, watch |
  56. | Dashboards & Notebooks | get, describe, create, edit, delete, apply, share, history, restore, diff, watch |
  57. | Documents & Trash | get, describe, create, edit, delete, share, history, restore |
  58. | DQL Queries | execute, verify, template variables, live mode, filter segments, wait conditions, spill large results to a file + local `inspect` (rows/schema/stats) |
  59. | SLOs | get, describe, create, edit, delete, apply, evaluate, watch |
  60. | Settings | get schemas, get/create/update/delete objects |
  61. | Buckets | get, describe, create, delete, apply, watch |
  62. | Segments | get, describe, create, edit, delete, apply, watch |
  63. | Lookup Tables | get, describe, create, delete, apply (CSV auto-detection) |
  64. | Anomaly Detectors | get, describe, create, edit, delete, apply |
  65. | Extensions 2.0 | get, describe, apply monitoring configs |
  66. | Hub Extensions | get, describe, list releases, filter by keyword |
  67. | App Functions & Intents | get, describe, execute, find, open (deep linking) |
  68. | Analyzers & CoPilot | statistical analyzers, CoPilot chat, NL-to-DQL, document search |
  69. | Cloud Integrations | AWS, Azure & GCP connections and monitoring (get, describe, create, delete, apply, update, enable) |
  70. | EdgeConnect | get, describe, create, delete |
  71. | Notifications | get, describe, delete, watch |
  72. | Users & Groups | get, describe |
  73. | Live Debugger | breakpoints, workspace filters, snapshot decoding |
  74. | Platform Tokens | account create/list/delete token (`dt0s16.*` via Account Management API) |
  75. | API Discovery | get apis (with `--uncovered`), describe api (operation index, one operation in full, raw spec) |
  76. See the **[Command Reference](docs/COMMANDS.md)** for the full list of verbs, flags, resource types, and aliases.
  77. ## AI Agent Skills
  78. dtctl ships with an [Agent Skill](https://agentskills.io) that teaches AI coding assistants how to use dtctl. Agents can also bootstrap at runtime with `dtctl commands`, which prints a compact minimal overview of verbs, resources, and subcommands (defaults to TOON); add `--brief` or `--full` for progressively more detail. Where `dtctl commands` answers *"what can I run?"*, `dtctl inventory` answers *"what is there to query?"* — it probes the current environment (read-only, budgeted) for fetchable data objects, buckets, filter segments, a live entity-type census, and capabilities present or absent, with the evidence cited for every absent one. The capability set is customizable via `--definitions` (see `docs/dev/examples/inventory-definitions.example.yaml`). For onboarding verification, `dtctl inventory arrivals --scope '<dql filter>'` answers *"is data arriving for this source right now?"* — a per-signal ingest state (live, stale, empty, no-data, n/a, absent, unknown) with counts and last-seen, gateable in CI with `--require`.
  79. ```bash
  80. # Install via skills.sh
  81. npx skills add Dynatrace/dtctl
  82. # Or install with dtctl itself
  83. dtctl skills install # Auto-detects your AI agent
  84. dtctl skills install --for claude # Or specify explicitly
  85. dtctl skills install --global # User-wide installation
  86. # Or copy manually
  87. cp -r skills/dtctl ~/.agents/skills/ # Cross-client (any agent)
  88. ```
  89. Compatible with GitHub Copilot, Claude Code, OpenAI Codex CLI, Cursor, Kiro, Junie, OpenCode, OpenClaw, and other [Agent Skills](https://agentskills.io)-compatible tools. See the **[AI Agent Mode docs](docs/AGENT_MODE.md)** for details on the structured JSON envelope and agent auto-detection.
  90. ### Dynatrace domain skills
  91. For deeper Dynatrace domain knowledge (DQL syntax, observability patterns, dashboards, logs, Kubernetes, and more) install the skills from **[Dynatrace/dynatrace-for-ai](https://github.com/Dynatrace/dynatrace-for-ai)**:
  92. ```bash
  93. npx skills add dynatrace/dynatrace-for-ai
  94. ```
  95. These skills provide the domain context (e.g., how to write DQL queries, which metrics to use for service health, how to navigate distributed traces) while dtctl provides the operational tool to act on it. Together they give AI agents everything they need to work with Dynatrace effectively.
  96. ## Running as a Service
  97. `dtctl serve http` exposes the CLI over HTTP for AI agents and automation. It is a **development-tier** feature: run `dtctl config set development.serve on` (or set `DTCTL_DEVELOPMENT=serve`) to enable the command, and expect the contract to change. See [Stability](docs/STABILITY.md) for what each tier promises. One request executes one dtctl command line for one tenant (`POST /v1/execute`) and returns the exact output the CLI would have printed. Each request brings its own environment URL and token, file arguments resolve against per-request virtual files, and host-only commands are unavailable. Go callers can embed `pkg/engine` directly instead. It is a reference implementation with no authentication of its own — see [Server Mode](docs/SERVE.md) before exposing it beyond localhost.
  98. ## Observability
  99. dtctl supports W3C Trace Context propagation and OTLP span export via the OpenTelemetry SDK. See [docs/OBSERVABILITY.md](docs/OBSERVABILITY.md) for full details on distributed tracing, environment variables, and CI/CD pipeline integration.
  100. ## Documentation
  101. Full documentation lives in the repo's **[docs/](docs/README.md)** directory:
  102. - [Installation](docs/INSTALLATION.md): Homebrew, shell script, binary download, build from source, shell completion
  103. - [Quick Start](docs/QUICK_START.md): Authentication, first commands, common patterns
  104. - [Configuration](docs/CONFIGURATION.md): Contexts, credentials, safety levels, aliases
  105. - [Command Reference](docs/COMMANDS.md): All verbs, flags, resource types, and examples
  106. - [Output Formats](docs/OUTPUT_FORMATS.md): Table, JSON, YAML, CSV, charts
  107. - [AI Agent Mode](docs/AGENT_MODE.md): Structured envelope, auto-detection, agent skill
  108. - [Token Scopes](docs/TOKEN_SCOPES.md): Required API token scopes per safety level
  109. - [Server Mode](docs/SERVE.md): Running dtctl as a server, the execute API, and embedding `pkg/engine`
  110. - [Stability](docs/STABILITY.md): What `stable`, `experimental`, and `development` promise, and how to pin a floor
  111. Resource-specific guides: [API Discovery](docs/resources/api-discovery.md) · [DQL Queries](docs/resources/dql-queries.md) · [Workflows](docs/resources/workflows.md) · [Dashboards](docs/resources/dashboards-notebooks.md) · [SLOs](docs/resources/slos.md) · [Settings](docs/resources/settings-api.md) · [Extensions](docs/resources/extensions.md) · [Analyzers](docs/resources/analyzers.md) · [CoPilot](docs/resources/copilot.md) · [and more...](docs/QUICK_START.md)
  112. ## Contributing
  113. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
  114. ## License
  115. Apache License 2.0. See [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.