Provides a CLI interface for the full Datadog platform: metrics, logs, monitors, APM, traces, dashboards, SLOs, incidents, security, infrastructure, RUM, and CI/CD. Supports OAuth2 and API key authentication with structured JSON output.
Ships in pup. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Pup is Datadog's AI-agent-ready CLI covering 49 command groups and 300+ subcommands across the full Datadog platform: metrics, logs, monitors, APM, traces, dashboards, SLOs, incidents, security, infrastructure, RUM, CI/CD, costs, and more.
Key traits:
pup --help and pup agent schema return structured JSON schemasbrew tap datadog-labs/pack
brew install pup
Or build from source:
git clone https://github.com/datadog-labs/pup.git && cd pup
cargo build --release
cp target/release/pup /usr/local/bin/pup
Verify installation:
pup --version
OAuth2 provides secure, browser-based auth with automatic token refresh. Tokens are stored in your OS keychain.
pup auth login # Opens browser for OAuth2 flow
pup auth status # Check token validity
pup auth refresh # Refresh expired token (no browser needed)
pup auth logout # Clear credentials
Tokens expire after ~1 hour. If a command returns 401/403:
pup auth refresh # Try this first
pup auth login # Full re-auth if refresh fails
For headless environments or when OAuth2 is unavailable:
export DD_API_KEY="your-api-key"
export DD_APP_KEY="your-app-key"
export DD_SITE="datadoghq.com" # Default; change for EU/other sites
DD_ACCESS_TOKEN — Stateless bearer token (highest priority)pup auth login)DD_API_KEY + DD_APP_KEY)| Site | DD_SITE value |
|---|---|
| US1 (default) | datadoghq.com |
| US3 | us3.datadoghq.com |
| US5 | us5.datadoghq.com |
| EU1 | datadoghq.eu |
| AP1 | ap1.datadoghq.com |
| US1-FED | ddog-gov.com |
Agent mode is auto-detected in Claude Code via the CLAUDE_CODE environment variable. No setup required.
What changes in agent mode:
| Behavior | Human Mode | Agent Mode |
|---|---|---|
--help output | Standard text | Structured JSON schema |
| Confirmations | Interactive prompt | Auto-approved |
| Error format | Human text | Structured JSON with error codes and suggestions |
| API responses | Raw data | Envelope with metadata (count, truncation, warnings) |
pup --help # Full JSON schema (auto in agent mode)
pup logs --help # Domain-specific schema
pup agent schema # Explicit full schema (works in any mode)
pup agent schema --compact # Minimal schema (fewer tokens)
pup agent guide # Full steering guide (markdown)
Use pup agent schema when unsure about a command's flags or syntax.
All commands follow a consistent structure:
pup <domain> <action> [flags] # Simple commands
pup <domain> <subgroup> <action> [flags] # Nested commands
pup <resource> list [--filters] # List/search
pup <resource> get <id> # Get by ID
pup <resource> create [--file=data.json] # Create from JSON
pup <resource> update <id> [--file=...] # Update
pup <resource> delete <id> [--yes] # Delete (--yes skips confirmation)
| Task | Command |
|---|---|
| Search error logs | pup logs search --query="status:error" --from=1h |
| Count logs by service | pup logs aggregate --query="*" --from=1h --compute="count" --group-by="service" |
| P99 latency by service | pup logs aggregate --query="env:prod" --from=30m --compute="percentile(@duration, 99)" --group-by="service" |
| Query CPU metrics | pup metrics query --query="avg:system.cpu.user{*}" --from=1h |
| List metrics | pup metrics list --filter="system.*" |
| Search traces | pup traces search --query="service:api AND @duration:>1000000000" --from=1h |
| List APM services | pup apm services list --env=production |
| Task | Command |
|---|---|
| List monitors | pup monitors list |
| Filter by tags | pup monitors list --tags="env:production" |
| Search monitors | pup monitors search --query="status:Alert" |
| List dashboards | pup dashboards list |
| Get dashboard URL | pup dashboards url abc-123 --from=now-1w --to=now --live=true |
| List SLOs | pup slos list |
| SLO status | pup slos status slo-123 --from=30d --to=now |
| Synthetics tests | pup synthetics tests list |
| Task | Command |
|---|---|
| List incidents | pup incidents list |
| Get incident | pup incidents get <incident-id> |
| List events | pup events list --from=4h |
| On-call teams | pup on-call teams list |
| Service context | pup idp assist my-service |
| Service dependencies | pup idp deps my-service |
| Who owns a service | pup idp owner my-service |
| Task | Command |
|---|---|
| Security signals | pup security signals list --from=24h |
| Security rules | pup security rules list |
| Critical findings | pup security findings search --query="@severity:critical" |
| Audit logs | pup audit-logs list --from=7d |
| Task | Command |
|---|---|
| List hosts | pup infrastructure hosts list |
| Filter hosts | pup infrastructure hosts list --filter="env:production" |
| Host tags | pup tags list |
| Containers | pup containers list |
| Fleet agents | pup fleet agents list --filter="hostname:my-host" |
| Task | Command |
|---|---|
| Find probe-able methods | pup symdb search --service=my-svc --query=MyController --view=probe-locations |
| Create log probe | pup debugger probes create --service=my-svc --env=prod --probe-location="com.example.MyClass:myMethod" --capture="request.id" --ttl=1h |
| Watch probe events | pup debugger probes watch <probe-id> --fields="message,captures,timestamp" --limit=10 |
pup monitors list --output=json # JSON (default, best for agents)
pup monitors list --output=table # Human-readable table
pup monitors list --output=yaml # YAML
pup monitors list --fields="id,name,status" # Custom field selection
All --from and --to flags accept these formats:
| Format | Example |
|---|---|
| Relative short | 1h, 30m, 7d, 5s, 1w |
| Relative long | 5min, 2hours, 3days |
| With spaces | "5 minutes", "2 hours" |
| RFC3339 | 2024-01-01T00:00:00Z |
| Unix ms | 1704067200000 |
| Keyword | now |
status:error # Filter by status
service:web-app # Filter by service
@user.id:12345 # Custom attribute (@ prefix)
host:i-* # Wildcard matching
"exact error message" # Exact phrase
status:error AND service:web # Boolean AND
status:error OR status:warn # Boolean OR
-status:info # Negation
@http.status_code:[400 TO 599] # Numeric range
avg:system.cpu.user{env:prod} by {host} # CPU by host
sum:trace.servlet.request.hits{service:web} # Request count
max:system.mem.used{*} by {host} # Max memory
CRITICAL: Durations are in NANOSECONDS
service:api-gateway # Filter by service
resource_name:/api/v1/users # Filter by endpoint
@duration:>5000000000 # Duration > 5s (nanoseconds!)
status:error # Error spans only
env:production # Filter by environment
| Status | Meaning | Fix |
|---|---|---|
| 401 | Authentication failed | pup auth refresh or check DD_API_KEY/DD_APP_KEY |
| 403 | Insufficient permissions | Verify API/App key scopes |
| 404 | Resource not found | Check the resource ID |
| 429 | Rate limited | Wait and retry with backoff |
| 5xx | Server error | Retry after delay; check https://status.datadoghq.com/ |
--from — most commands default to 1h but be explicit--tags, --query, --name flags instead of fetching everythingaggregate for counts — pup logs aggregate --compute=count, not fetch-all-and-countpup agent schema when unsure about a command's flags--from on time-series queries — you'll get unexpected ranges or errors--limit=1000 first — start small (--limit=20) and refinepup logs aggregate --compute=count--from=30d unless you specifically need a month of data# 1. Get error counts by service
pup logs aggregate --query="status:error" --from=1h --compute="count" --group-by="service"
# 2. Drill into affected service
pup logs search --query="status:error AND service:<name>" --from=1h --limit=20
# 3. Check monitors for that service
pup monitors list --tags="service:<name>"
# 4. Check recent events
pup events list --from=4h
# 1. Check service latency
pup metrics query --query="avg:trace.servlet.request.duration{service:<name>} by {resource_name}" --from=1h
# 2. Find slow traces (>5 seconds — note nanoseconds!)
pup traces search --query="service:<name> AND @duration:>5000000000" --from=1h
# 3. Check resource utilization
pup metrics query --query="avg:system.cpu.user{service:<name>} by {host}" --from=1h
pup idp assist <service-name> # Full context: owner, on-call, health, deps
pup slos list # Check SLO compliance
pup monitors list --tags="team:<team>"
pup incidents list --query="status:active"
| Flag | Description |
|---|---|
-o, --output | Output format: json, table, yaml (default: json) |
-y, --yes | Skip confirmation prompts for destructive operations |
--read-only | Block all write operations (create, update, delete) |
--verbose | Enable verbose logging |
--site | Datadog site override (default: datadoghq.com) |
--config | Config file path (default: ~/.config/pup/config.yaml) |
| Variable | Purpose |
|---|---|
DD_ACCESS_TOKEN | Bearer token for stateless auth (highest priority) |
DD_API_KEY | Datadog API key |
DD_APP_KEY | Datadog Application key |
DD_SITE | Datadog site (default: datadoghq.com) |
DD_AUTO_APPROVE | Auto-approve destructive operations (true/false) |
DD_TOKEN_STORAGE | Token storage backend: keychain or file |
DD_READ_ONLY | Block all write operations (true/false) |
For detailed documentation beyond this quick reference, see:
YAML-defined multi-step operational procedures stored in ~/.config/pup/runbooks/:
pup runbooks list # List available runbooks
pup runbooks describe incident-triage # Inspect steps
pup runbooks run deploy-service --arg SERVICE=payments --arg VERSION=1.2.3
pup runbooks run deploy-service --dry-run # Preview without executing
Turns pup into a local AI agent server for Bits AI:
pup acp serve # Start server (auto-discovers Bits AI agent)
pup acp serve --agent-id <uuid> # Target specific agent
Exposes ACP and OpenAI-compatible endpoints at http://127.0.0.1:9099.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/pup:pupfrom pup
npx claudepluginhub dashed/claude-marketplace --plugin pupOther plugins' skills for the same job