[PREVIEW] Pup - Datadog API CLI Wrapper
NOTICE: This is in Preview mode, we are fine tuning the interactions and bugs that arise. Please file issues or submit PRs. Thank you for your early interest!

A Go-based command-line wrapper for easy interaction with Datadog APIs.
Features
- Native Go Implementation: Fast, cross-platform binary
- OAuth2 Authentication: Secure browser-based login with PKCE protection
- API Key Support: Traditional API key authentication still available
- Simple Commands: Intuitive CLI for common Datadog operations
- JSON Output: Structured output for easy parsing and automation
- Dynamic Client Registration: Each installation gets unique OAuth credentials
API Coverage
Pup implements 38 of 85+ available Datadog APIs (44.7% coverage).
See docs/COMMANDS.md for detailed command reference.
π‘ Tip: Use Ctrl/Cmd+F to search for specific APIs. Request features via GitHub Issues.
π Core Observability (6/9 implemented)
| API Domain |
Status |
Pup Commands |
Notes |
| Metrics |
β
|
metrics search, metrics query, metrics list, metrics get |
V1 and V2 APIs supported |
| Logs |
β
|
logs search, logs list, logs aggregate |
V1 and V2 APIs supported |
| Events |
β
|
events list, events search, events get |
Infrastructure event management |
| RUM |
β
|
rum apps, rum sessions, rum metrics list/get, rum retention-filters list/get |
Apps, sessions, metrics, retention filters (create/update pending) |
| APM Services |
β
|
apm services, apm entities, apm dependencies, apm flow-map |
Services stats, operations, resources; entity queries; dependencies; flow visualization |
| Traces |
β |
- |
Not yet implemented |
| Profiling |
β |
- |
Not yet implemented |
| Session Replay |
β |
- |
Not yet implemented |
| Spans Metrics |
β |
- |
Not yet implemented |
π Monitoring & Alerting (6/9 implemented)
| API Domain |
Status |
Pup Commands |
Notes |
| Monitors |
β
|
monitors list, monitors get, monitors delete, monitors search |
Full CRUD support with advanced search |
| Dashboards |
β
|
dashboards list, dashboards get, dashboards delete, dashboards url |
Full management capabilities |
| SLOs |
β
|
slos list, slos get, slos create, slos update, slos delete, slos corrections |
Full CRUD plus corrections |
| Synthetics |
β
|
synthetics tests list, synthetics locations list |
Test management support |
| Downtimes |
β
|
downtime list, downtime get, downtime cancel |
Full downtime management |
| Notebooks |
β
|
notebooks list, notebooks get, notebooks delete |
Investigation notebooks supported |
| Dashboard Lists |
β |
- |
Not yet implemented |
| Powerpacks |
β |
- |
Not yet implemented |
| Workflow Automation |
β |
- |
Not yet implemented |
π Security & Compliance (6/9 implemented)
| API Domain |
Status |
Pup Commands |
Notes |
| Security Monitoring |
β
|
security rules list, security signals list, security findings search |
Rules, signals, findings with advanced search |
| Static Analysis |
β
|
static-analysis ast, static-analysis custom-rulesets, static-analysis sca, static-analysis coverage |
Code security analysis |
| Audit Logs |
β
|
audit-logs list, audit-logs search |
Full audit log search and listing |
| Data Governance |
β
|
data-governance scanner-rules list |
Sensitive data scanner rules |
| Application Security |
β |
- |
Not yet implemented |
| CSM Threats |
β |
- |
Not yet implemented |
| Cloud Security (CSPM) |
β |
- |
Not yet implemented |
| Sensitive Data Scanner |
β |
- |
Not yet implemented |
βοΈ Infrastructure & Cloud (6/8 implemented)
| API Domain |
Status |
Pup Commands |
Notes |
| Infrastructure |
β
|
infrastructure hosts list, infrastructure hosts get |
Host inventory management |
| Tags |
β
|
tags list, tags get, tags add, tags update, tags delete |
Host tag operations |
| Network |
β³ |
network flows list, network devices list |
Placeholder - API endpoints pending |
| Cloud (AWS) |
β
|
cloud aws list |
AWS integration management |
| Cloud (GCP) |
β
|
cloud gcp list |
GCP integration management |
| Cloud (Azure) |
β
|
cloud azure list |
Azure integration management |
| Containers |
β |
- |
Not yet implemented |
| Processes |
β |
- |
Not yet implemented |
π¨ Incident & Operations (6/7 implemented)
| API Domain |
Status |
Pup Commands |
Notes |
| Incidents |
β
|
incidents list, incidents get, incidents attachments |
Incident management with attachment support |
| On-Call (Teams) |
β
|
on-call teams (CRUD, memberships with roles) |
Full team management system with admin/member roles |
| Case Management |
β
|
cases (create, search, assign, archive, projects) |
Complete case management with priorities P1-P5 |
| Error Tracking |
β
|
error-tracking issues search, error-tracking issues get |
Error issue search and details |
| Service Catalog |
β
|
service-catalog list, service-catalog get |
Service registry management |
| Scorecards |
β
|
scorecards list, scorecards get |
Service quality scores |
| Incident Services/Teams |
β |
- |
Not yet implemented |
π§ CI/CD & Development (1/3 implemented)
| API Domain |
Status |
Pup Commands |
Notes |
| CI Visibility |
β
|
cicd pipelines list, cicd events list |
CI/CD pipeline visibility and events |
| Test Optimization |
β |
- |
Not yet implemented |
| DORA Metrics |
β |
- |
Not yet implemented |
π₯ Organization & Access (5/6 implemented)
| API Domain |
Status |
Pup Commands |
Notes |
| Users |
β
|
users list, users get, users roles |
User and role management |
| Organizations |
β
|
organizations get, organizations list |
Organization settings management |
| API Keys |
β
|
api-keys list, api-keys get, api-keys create, api-keys delete |
Full API key CRUD |
| App Keys |
β
|
app-keys list, app-keys get, app-keys register, app-keys unregister |
App key registration for Action Connections |
| Service Accounts |
β
|
- |
Managed via users commands |
| Roles |
β |
- |
Only list via users |
βοΈ Platform & Configuration (7/9 implemented)
| API Domain |
Status |
Pup Commands |
Notes |
| Usage Metering |
β
|
usage summary, usage hourly |
Usage and billing metrics |
| Cost Management |
β
|
cost projected, cost attribution, cost by-org |
Cost attribution by tags and organizations |
| Product Analytics |
β
|
product-analytics events send |
Server-side product analytics events |
| Integrations |
β
|
integrations slack, integrations pagerduty, integrations webhooks |
Third-party integrations support |
| Observability Pipelines |
β³ |
obs-pipelines list, obs-pipelines get |
Placeholder - API endpoints pending |
| Miscellaneous |
β
|
misc ip-ranges, misc status |
IP ranges and status |
| Key Management |
β |
- |
Not yet implemented |
| IP Allowlist |
β |
- |
Not yet implemented |
Installation
Homebrew (macOS/Linux) - Coming soon!
brew tap datadog/pack
brew install datadog/pack/pup
Go Install
go install github.com/DataDog/pup@latest
Manual Download
Download pre-built binaries from the latest release.
Authentication
Pup supports two authentication methods. OAuth2 is preferred and will be used automatically if you've logged in.
OAuth2 Authentication (Preferred)
OAuth2 provides secure, browser-based authentication with automatic token refresh.
# Set your Datadog site (optional)
export DD_SITE="datadoghq.com" # Defaults to datadoghq.com
# Login via browser
pup auth login
# Use any command - OAuth tokens are used automatically
pup monitors list
# Check status
pup auth status
# Logout
pup auth logout
Token Storage: Tokens are stored securely in your system's keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service). Set DD_TOKEN_STORAGE=file to use file-based storage instead.
Note: OAuth2 requires Dynamic Client Registration (DCR) to be enabled on your Datadog site. If DCR is not available yet, use API key authentication.
See docs/OAUTH2.md for detailed OAuth2 documentation.
API Key Authentication (Fallback)
If OAuth2 tokens are not available, Pup automatically falls back to API key authentication.
export DD_API_KEY="your-datadog-api-key"
export DD_APP_KEY="your-datadog-application-key"
export DD_SITE="datadoghq.com" # Optional, defaults to datadoghq.com
# Use any command - API keys are used automatically
pup monitors list
Authentication Priority
Pup checks for authentication in this order:
- OAuth2 tokens (from
pup auth login) - Used if valid tokens exist
- API keys (from
DD_API_KEY and DD_APP_KEY) - Used if OAuth tokens not available
Usage
Authentication
# OAuth2 login (recommended)
pup auth login
# Check authentication status
pup auth status
# Refresh access token
pup auth refresh
# Logout
pup auth logout
Test Connection
pup test
Monitors
# List all monitors
pup monitors list
# Get specific monitor
pup monitors get 12345678
# Delete monitor
pup monitors delete 12345678 --yes
Metrics
# Search metrics using classic query syntax (v1 API)
pup metrics search --query="avg:system.cpu.user{*}" --from="1h"
# Query time-series data (v2 API)
pup metrics query --query="avg:system.cpu.user{*}" --from="1h"
# List available metrics
pup metrics list --filter="system.*"
Dashboards
# List all dashboards
pup dashboards list
# Get dashboard details
pup dashboards get abc-123-def
# Delete dashboard
pup dashboards delete abc-123-def --yes
SLOs
# List all SLOs
pup slos list
# Get SLO details
pup slos get abc-123
# Delete SLO
pup slos delete abc-123 --yes
Incidents
# List all incidents
pup incidents list
# Get incident details
pup incidents get abc-123-def
Global Flags
-o, --output: Output format (json, table, yaml) - default: json
-y, --yes: Skip confirmation prompts for destructive operations
Environment Variables
DD_API_KEY: Datadog API key (optional if using OAuth2)
DD_APP_KEY: Datadog Application key (optional if using OAuth2)
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, default: auto-detect)
Development
# Run tests
go test ./...
# Build
go build -o pup .
# Run without building
go run main.go monitors list
License
Apache License 2.0 - see LICENSE for details.
Documentation
For detailed documentation, see CLAUDE.md.