PagerDuty CLI
$ pd Community Med RiskPagerDuty CLI (pd) wraps PagerDuty's REST API in an oclif Node.js CLI for listing incidents, checking on-call schedules, acknowledging alerts, and invoking raw pd rest endpoints. While practical for SRE triage with --json, the upstream repository (martindstone/pagerduty-cli) is no longer actively maintained.
npm install -g pagerduty-cli Use pd for quick read-only incident/schedule checks or raw pd rest calls, or prefer an actively maintained PagerDuty MCP/API integration for production on-call automation.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --json on list commands and PD_API_KEY env var auth, though some older oclif flags vary across subcommands.
--jsonsupported onincident listandservice listpd restescape hatch covers arbitrary REST endpoints
Read-only API tokens can be scoped in PagerDuty, but unmaintained npm dependencies reduce security assurance.
- Supports read-only PagerDuty REST API keys
- No security patches upstream after maintainer deprecation notice
Standard global npm package (pagerduty-cli) across Node.js platforms, though aging Node dependency tree may warn.
npm install -g pagerduty-cli
Convenient for incident triage, schedules, and pd rest scripting when an official CLI is absent.
- Covers
incident,service,schedule, andresttopics
Community repository (martindstone/pagerduty-cli) explicitly marked as no longer actively maintained.
- Maintainer notice on GitHub stating repository is unmaintained
Documented via GitHub README and built-in pd help, though no official vendor docs exist.
- README and oclif
--helppages
Security, Auth & Guardrails
Stores API tokens in ~/.config/pagerduty-cli/config.json via pd auth:set or reads PD_API_KEY from the environment.
CLI is free (ISC); requires a PagerDuty subscription.
# PagerDuty CLI Agent Rules - Restrict autonomous runs to read-only `list` / `show` commands with `--json`. - NEVER acknowledge, resolve, or trigger incidents (`incident ack`, `resolve`, `create`) without explicit on-call human approval. - Audit `pagerduty-cli` dependencies before installing in sensitive environments, as upstream is unmaintained.
Agent-Ready Command Recipes
Safe Read-Only Queries
pd incident list --statuses triggered --json
Retrieves currently triggered incidents in JSON for read-only SRE triage.
pd service list --json
Enumerates monitored services and their status in structured JSON.
Controlled Writes & Previews
pd incident ack --ids P123456
Marks a specific incident ID as acknowledged during human-supervised incident response.
Strengths for Agents
- + Clean
--jsonoutput on incident and service queries plus apd restfallback. - + Supports
PD_API_KEYenvironment-variable auth for headless triage. - + Useful stopgap given PagerDuty lacks a widely adopted official CLI.
Caveats & Pitfalls
- ! Upstream repository (
martindstone/pagerduty-cli) is no longer actively maintained and carries aging npm dependencies. - ! Community-maintained rather than officially supported by PagerDuty.