PUP(1)

NAME

pupGive your AI agent a Pup — a CLI companion with 200+ commands across 33+ Datadog products.

SYNOPSIS

$brew install datadog-labs/pack/pup

INFO

591 stars
49 forks
0 views

DESCRIPTION

Give your AI agent a Pup — a CLI companion with 200+ commands across 33+ Datadog products.

README

:dog2: Give Your Agent a Puppy: Introducing Pup CLI

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!

CI Rust License

Every AI agent needs a loyal companion. Meet Pup — the CLI that gives your agents full access to Datadog's observability platform (because even autonomous agents need good tooling, not just tricks).

What is Pup?

A comprehensive, AI-agent-ready CLI with 200+ commands across 33 Datadog products. We've unleashed the full power of Datadog's APIs so your agents can fetch metrics, sniff out errors, and track down issues without barking up the wrong API tree.

AI agents are the fastest-growing interface for infrastructure management. Companies like Vercel and AWS are racing to make their platforms agent-accessible, but we're leading the pack. Pup makes Datadog the alpha choice for AI-native workflows with 100% documented API coverage while competitors are still learning basic commands.

Why Your Agent Will Love It

  • :paw_prints: Well-trained: Self-discoverable commands (no need to chase documentation)
  • :guide_dog: Obedient: Structured JSON/YAML output for easy parsing
  • :service_dog: On a leash: OAuth2 + PKCE for scoped access (no more long-lived keys running wild)
  • :dog: Knows all the tricks: Monitors, logs, metrics, RUM, security and more!

Try It (Humans Welcome Too!)

# Give your agent credentials (house-training, basically)
pup auth login

Now they can fetch data like a good pup

pup monitors list --tags="team:api-platform" # Fetch monitors pup logs search --query="status:error" --from="1h" # Sniff out errors pup metrics query --query="avg:system.cpu.user{*}" # Track the metrics tail

:dog: TL;DR: We built a comprehensive CLI so AI agents can use Datadog like a pro. Give your agent a pup. They're housetrained, loyal, and know way more tricks than you'd expect.

P.S. No actual puppies were harmed in the making of this CLI. Just a lot of Rust code and API endpoints.

API Coverage

Pup implements 45 of 85+ available Datadog APIs (53% coverage) with 300+ subcommands across 49 command groups.

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 (5/9 implemented)
API DomainStatusPup CommandsNotes
Metricsmetrics search, metrics query, metrics list, metrics getV1 and V2 APIs supported
Logslogs search, logs list, logs aggregateV1 and V2 APIs supported
Eventsevents list, events search, events getInfrastructure event management
RUMrum apps, rum sessions, rum metrics, rum retention-filters, rum playlists, rum heatmapsApps, sessions, metrics, retention filters, replay playlists, heatmaps
APM Servicesapm services, apm entities, apm dependencies, apm flow-mapServices 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 (7/10 implemented)
API DomainStatusPup CommandsNotes
Monitorsmonitors list, monitors get, monitors delete, monitors searchFull CRUD support with advanced search
Dashboardsdashboards list, dashboards get, dashboards delete, dashboards urlFull management capabilities
SLOsslos list, slos get, slos delete, slos statusFull CRUD plus V2 status query
Syntheticssynthetics tests, synthetics locations, synthetics suitesTests, locations, and V2 suites management
Downtimesdowntime list, downtime get, downtime cancelFull downtime management
Notebooksnotebooks list, notebooks get, notebooks deleteInvestigation notebooks supported
Status Pagesstatus-pages pages, status-pages components, status-pages degradationsNew — Pages, components, and degradation management
Dashboard Lists-Not yet implemented
Powerpacks-Not yet implemented
Workflow Automation-Not yet implemented
🔒 Security & Compliance (4/8 implemented)
API DomainStatusPup CommandsNotes
Security Monitoringsecurity rules, security signals, security findings, security content-packs, security risk-scoresRules, signals, findings, content packs, entity risk scores
Static Analysisstatic-analysis ast, static-analysis custom-rulesets, static-analysis sca, static-analysis coverageCode security analysis
Audit Logsaudit-logs list, audit-logs searchFull audit log search and listing
Data Governancedata-governance scanner-rules listSensitive 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 (7/9 implemented)
API DomainStatusPup CommandsNotes
Infrastructureinfrastructure hosts list, infrastructure hosts getHost inventory management
Tagstags list, tags get, tags add, tags update, tags deleteHost tag operations
Networknetwork flows list, network devices listPlaceholder — API endpoints pending
Cloud (AWS)cloud aws listAWS integration management
Cloud (GCP)cloud gcp listGCP integration management
Cloud (Azure)cloud azure listAzure integration management
Cloud (OCI)cloud ociNew — Oracle Cloud tenancy configs and products
Containers-Not yet implemented
Processes-Not yet implemented
🚨 Incident & Operations (8/9 implemented)
API DomainStatusPup CommandsNotes
Incidentsincidents list, incidents get, incidents attachments, incidents settings, incidents handles, incidents postmortem-templatesIncident management with settings, handles, and postmortem templates
On-Call (Teams)on-call teams (CRUD, memberships with roles)Full team management system with admin/member roles
Case Managementcases (create, search, assign, archive, projects, jira, servicenow, move)Complete case management with Jira/ServiceNow linking
Error Trackingerror-tracking issues search, error-tracking issues getError issue search and details
Service Catalogservice-catalog list, service-catalog getService registry management
Scorecardsscorecards list, scorecards getService quality scores
Fleet Automationfleet agents, fleet deployments, fleet schedulesAgent management, deployments, schedules (Preview)
HAMRhamr connections get, hamr connections createNew — High Availability Multi-Region connections
Incident Services/Teams-Not yet implemented
🔧 CI/CD & Development (4/4 implemented)
API DomainStatusPup CommandsNotes
CI Visibilitycicd pipelines list, cicd events listCI/CD pipeline visibility and events
Test Optimizationcicd tests, cicd flaky-testsNew — Test events and flaky test management
DORA Metricscicd doraNew — DORA deployment patching
Code Coveragecode-coverage branch-summary, code-coverage commit-summaryNew — Branch and commit-level coverage summaries
👥 Organization & Access (5/6 implemented)
API DomainStatusPup CommandsNotes
Usersusers list, users get, users rolesUser and role management
Organizationsorganizations get, organizations listOrganization settings management
API Keysapi-keys list, api-keys get, api-keys create, api-keys deleteFull API key CRUD
App Keysapp-keys list, app-keys get, app-keys create, app-keys update, app-keys deleteFull application key CRUD
Service Accounts-Managed via users commands
Roles-Only list via users
⚙️ Platform & Configuration (6/8 implemented)
API DomainStatusPup CommandsNotes
Usage Meteringusage summary, usage hourlyUsage and billing metrics
Cost Managementcost projected, cost attribution, cost by-orgCost attribution by tags and organizations
Product Analyticsproduct-analytics events sendServer-side product analytics events
Integrationsintegrations slack, integrations pagerduty, integrations webhooks, integrations jira, integrations servicenowThird-party integrations with Jira and ServiceNow support
Observability Pipelinesobs-pipelines list, obs-pipelines getPlaceholder — API endpoints pending
Miscellaneousmisc ip-ranges, misc statusIP ranges and status
Key Management-Not yet implemented
IP Allowlist-Not yet implemented

Installation

Homebrew (macOS/Linux)

brew tap datadog-labs/pack
brew install datadog-labs/pack/pup

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

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

Bearer Token Authentication (WASM / Headless)

For WASM builds or environments without keychain access, use a pre-obtained bearer token:

export DD_ACCESS_TOKEN="your-oauth-access-token"
export DD_SITE="datadoghq.com"

pup monitors list

API key authentication (DD_API_KEY + DD_APP_KEY) also works in WASM. See the WASM section below.

Authentication Priority

Pup checks for authentication in this order:

  1. DD_ACCESS_TOKEN - Stateless bearer token (highest priority)
  2. OAuth2 tokens (from pup auth login) - Used if valid tokens exist
  3. 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_ACCESS_TOKEN: Bearer token for stateless auth (highest priority)
  • DD_API_KEY: Datadog API key (optional if using OAuth2 or DD_ACCESS_TOKEN)
  • DD_APP_KEY: Datadog Application key (optional if using OAuth2 or DD_ACCESS_TOKEN)
  • 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)

Agent Mode

When pup is invoked by an AI coding agent, it automatically switches to agent mode which returns structured JSON responses optimized for machine consumption (including metadata, error details, and hints). Agent mode also auto-approves confirmation prompts.

Agent mode is auto-detected when any of these environment variables are set to 1 or true:

VariableAgent
CLAUDE_CODE or CLAUDECODEClaude Code
CURSOR_AGENTCursor
CODEX or OPENAI_CODEXOpenAI Codex
AIDERAider
CLINECline
WINDSURF_AGENTWindsurf
GITHUB_COPILOTGitHub Copilot
AMAZON_Q or AWS_Q_DEVELOPERAmazon Q
GEMINI_CODE_ASSISTGemini Code Assist
SRC_CODYSourcegraph Cody
FORCE_AGENT_MODEAny agent (manual override)

You can also enable it explicitly with the --agent flag or by setting FORCE_AGENT_MODE=1:

# Auto-detected (e.g., running inside Claude Code)
pup monitors list

Explicit flag

pup monitors list --agent

Environment variable override

FORCE_AGENT_MODE=1 pup monitors list

If you are integrating pup into an AI agent workflow, make sure the appropriate environment variable is set so responses are optimized for your agent. Without it, pup defaults to human-friendly output.

WASM

Pup compiles to WebAssembly via the wasm32-wasip2 target for use in WASI-compatible runtimes such as Wasmtime, Wasmer, and Cloudflare Workers.

Building

# Install the WASI target
rustup target add wasm32-wasip2

Build for WASI

cargo build --target wasm32-wasip2 --no-default-features --features wasi --release

Authentication

The WASM build supports stateless authentication — keychain storage and browser-based OAuth login are not available. Use either DD_ACCESS_TOKEN or API keys:

# Option 1: Bearer token
DD_ACCESS_TOKEN="your-token" DD_SITE="datadoghq.com" wasmtime run target/wasm32-wasip2/release/pup.wasm -- monitors list

Option 2: API keys

DD_API_KEY="your-api-key" DD_APP_KEY="your-app-key" wasmtime run target/wasm32-wasip2/release/pup.wasm -- monitors list

The pup auth status command works in WASM and reports which credentials are configured. The login, logout, and refresh subcommands return guidance to use DD_ACCESS_TOKEN.

Limitations

  • No local token storage (keychain/file) — use DD_ACCESS_TOKEN or API keys
  • No browser-based OAuth login flow
  • Networking relies on the host runtime's networking capabilities

Running with Wasmtime

# Run directly
wasmtime run --env DD_ACCESS_TOKEN="your-token" target/wasm32-wasip2/release/pup.wasm -- monitors list

Or with API keys

wasmtime run --env DD_API_KEY="key" --env DD_APP_KEY="key" target/wasm32-wasip2/release/pup.wasm -- --help

Agent Skills

Pup ships 7 skills and 48 domain agents embedded in the binary, installable to any AI coding assistant.

# Install all skills and agents for your AI assistant
pup skills install

Install for a specific tool

pup skills install --target-agent=claude-code pup skills install --target-agent=cursor

List available skills and agents

pup skills list pup skills list --type=skill pup skills list --type=agent

Install a specific skill

pup skills install dd-monitors

For Claude Code, skills install to .claude/skills/ and agents install to .claude/agents/ (native subagent format). For other tools, everything installs as SKILL.md in the tool's skills directory.

Pup is also available as a Claude Code plugin marketplace:

/plugin marketplace add datadog-labs/pup

Development

# Run tests
cargo test

Build

cargo build --release

Lint

cargo clippy -- -D warnings

Format check

cargo fmt --check

Build WASM

rustup target add wasm32-wasip2 cargo build --target wasm32-wasip2 --no-default-features --features wasi

Run without building

cargo run -- monitors list

License

Apache License 2.0 - see LICENSE for details.

Documentation

For detailed documentation, see CLAUDE.md.

SEE ALSO

clihub3/12/2026PUP(1)