appdynamics-clilisted
Install: claude install-skill abdullahkhawer/devops-skills
# AppDynamics CLI Skill
Use the instance and rules below when constructing all AppDynamics API commands.
## Instances
Update the table below with your AppDynamics controller URLs and credential file paths:
| Environment | Controller URL | Account | Credential File |
|---|---|---|---|
| Production | `https://<your-controller>.saas.appdynamics.com` | `<your-prod-account>` | `~/.appdynamics/prod.token` |
| Staging | `https://<your-controller>.saas.appdynamics.com` | `<your-staging-account>` | `~/.appdynamics/staging.token` |
If the target instance is unclear, ask the user before running any command.
## Prerequisites (one-time setup by user)
Generate an AppDynamics API client (**Administration → API Clients**) for each environment and save `<client-id>@<account>:<client-secret>` to the corresponding credential file. Never print or display credential values. Do not perform these steps yourself.
```bash
mkdir -p ~/.appdynamics && echo "<client-id>@<account>:<client-secret>" > <CREDENTIAL_FILE> && chmod 600 <CREDENTIAL_FILE>
```
## Command Format
AppDynamics uses OAuth — obtain a short-lived bearer token first, then call the API:
```bash
TOKEN=$(curl -s -X POST "<CONTROLLER_URL>/controller/api/oauth/access_token" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "client_id=$(cut -d: -f1 <CREDENTIAL_FILE>)" \
--data-urlencode "client_secret=$(cut -d: -f2 <CREDENTIAL_FILE>)" | jq -r '.access_token')
curl -s -H "Authorization: Bearer $TOKEN" \
"<