@@ -40,8 +40,13 @@ Make sure `$(go env GOPATH)/bin` is in your `$PATH`.
4040
4141## Quick Start
4242
43+ ` dtmgd ` supports any number of named environments ("contexts"). The name you
44+ choose is just an alias — there are no reserved names. Pick whatever fits
45+ your setup: ` prod ` , ` staging ` , ` dev ` , ` eu-prod ` , ` acme-tenant ` , anything.
46+
4347``` bash
44- # 1. Create a context pointing to your Managed cluster
48+ # 1. Create a context pointing to your Managed cluster.
49+ # Replace "prod" below with any alias you want for this environment.
4550dtmgd config set-context prod \
4651 --host https://managed.company.com \
4752 --env-id abc12345 \
@@ -57,6 +62,11 @@ dtmgd get environments
5762dtmgd get problems --status OPEN
5863```
5964
65+ You can repeat step 1 as many times as needed to register additional
66+ environments — there is no limit on the number of contexts, and each can use
67+ any alias you choose. See [ Multi-Environment Queries] ( #multi-environment-queries )
68+ for cross-context fan-out.
69+
6070> ** Note on token storage** : when an OS keyring (macOS Keychain, GNOME Keyring,
6171> Windows Credential Manager) is available, the token is stored there and the
6272> config file keeps only an empty placeholder. On headless Linux systems without
@@ -178,15 +188,21 @@ dtmgd query log-counts --entity 'type(SERVICE),tag("[Environment]BookStore")' --
178188Query one, several, or all configured environments in a single command.
179189Requests fan out in parallel and results are merged.
180190
191+ Context names (`prod`, `staging` below) are just user-defined aliases —
192+ substitute whatever names you used when configuring your contexts.
193+
181194```bash
182- # Query all environments
195+ # Query all configured environments
183196dtmgd get problems --env ALL_ENVIRONMENTS -o json
184197
185- # Query specific environments (semicolon-separated)
198+ # Query specific environments (semicolon-separated list of your context names )
186199dtmgd get problems --env "prod;staging" -o json
187200
188- # Single env result → unwrapped data
189- # Multi env result → { "prod": {...}, "staging": {...} }
201+ # You can list any number of contexts:
202+ dtmgd get problems --env "eu-prod;us-prod;ap-prod;dev" -o json
203+
204+ # Single env result → unwrapped data
205+ # Multi env result → { "<context-1>": {...}, "<context-2>": {...} }
190206```
191207
192208The ` --env ` flag works with all ` get ` , ` describe ` , and ` query ` commands.
@@ -215,6 +231,44 @@ Errors are also wrapped:
215231
216232Force it on with ` -A ` / ` --agent ` , or disable auto-detection with ` --no-agent ` .
217233
234+ ### Install the dtmgd Skill for Your AI Agent
235+
236+ ` dtmgd ` ships with an embedded skill file (` SKILL.md ` ) that teaches your AI
237+ coding assistant how to use the CLI effectively — including command patterns,
238+ output formats, and gotchas specific to Dynatrace Managed Classic.
239+
240+ Install it with one command — the target agent is auto-detected from your
241+ environment, or you can pick it explicitly:
242+
243+ ``` bash
244+ # Auto-detect the current AI agent and install
245+ dtmgd skills install
246+
247+ # Install for a specific agent (claude, copilot, cursor, junie, kiro, opencode)
248+ dtmgd skills install --for claude
249+
250+ # Install user-wide (instead of project-local)
251+ dtmgd skills install --for claude --global
252+
253+ # Install to the cross-client shared directory (agentskills.io convention)
254+ # — picked up automatically by any compatible agent
255+ dtmgd skills install --cross-client
256+
257+ # List all supported agents and their install paths
258+ dtmgd skills install --list
259+
260+ # Check what's installed across all agents
261+ dtmgd skills status
262+
263+ # Remove the skill
264+ dtmgd skills uninstall --for claude
265+ ```
266+
267+ Skill files are installed as a directory following the
268+ [ agentskills.io] ( https://agentskills.io ) standard:
269+ ` <agent-config>/skills/dtmgd/SKILL.md ` . Use ` --force ` to overwrite an
270+ existing installation.
271+
218272## Pagination
219273
220274All list commands (` get problems ` , ` get entities ` , etc.) automatically follow
@@ -245,22 +299,40 @@ Both relative and absolute times are accepted:
245299
246300## Configuration File Format
247301
302+ Context names (` production ` , ` staging ` , etc.) and token names (` prod-token ` )
303+ are user-chosen aliases. There are no reserved names — pick whatever fits
304+ your environments. You can register as many contexts as you need.
305+
248306``` yaml
249307apiVersion : dtmgd.io/v1
250308kind : Config
251- current-context : production
309+ current-context : production # any context name from the list below
252310contexts :
253- - name : production
311+ - name : production # ← user-defined alias
254312 context :
255313 host : https://managed.company.com # Managed cluster base URL
256314 env-id : abc12345 # Environment ID
257- token-ref : prod-token
315+ token-ref : prod-token # reference into tokens list
258316 description : Production environment
259317 http-proxy : http://proxy.corp:8080 # optional HTTP proxy
260318 https-proxy : http://proxy.corp:8080 # optional HTTPS proxy
319+ - name : staging # ← another user-defined alias; add as many as needed
320+ context :
321+ host : https://managed-staging.company.com
322+ env-id : def67890
323+ token-ref : staging-token
324+ - name : eu-prod # ← any name you want
325+ context :
326+ host : https://managed-eu.company.com
327+ env-id : xyz12345
328+ token-ref : eu-prod-token
261329tokens :
262- - name : prod-token
330+ - name : prod-token # ← matches token-ref above
263331 token : " " # empty when stored in OS keyring
332+ - name : staging-token
333+ token : " "
334+ - name : eu-prod-token
335+ token : " "
264336preferences :
265337 output : table
266338` ` `
0 commit comments