A local CLI that acknowledges PagerDuty incidents only when the configured user is on call.
View the Project on GitHub nithishduda-ai/pagerduty-oncall-ack
Every poll cycle follows this decision flow:
--env-file.PD_USER_ID or /users/me.GET /oncalls for that user at the current time.GET /incidents for open incidents assigned to that user with statuses[]=triggered and statuses[]=acknowledged.PUT /incidents/{id} with status: acknowledged.The CLI only acknowledges incidents when:
triggeredThe CLI does not acknowledge incidents assigned to someone else. It does not acknowledge already acknowledged incidents. It does not resolve incidents, reassign incidents, edit titles, or add notes.
For display, open incidents means incidents with PagerDuty status triggered or acknowledged.
For action, only triggered incidents are eligible for acknowledgement. Already acknowledged incidents are shown for operator awareness but are not updated.
Dry-run mode is the default. These commands do not change PagerDuty:
pd-auto-ack run --env-file ~/.pd-auto-ack.env --once
pd-auto-ack run --env-file ~/.pd-auto-ack.env --watch --interval 30
Live mode requires --apply:
pd-auto-ack run --env-file ~/.pd-auto-ack.env --watch --interval 30 --apply
You can also set PD_APPLY=true in the env file, but leaving PD_APPLY=false and passing --apply explicitly is safer.
pd-auto-ack tui uses the same decision flow as run, but displays it in an interactive terminal dashboard.
The dashboard refreshes on the configured interval, shows open incidents and selected incident details, and starts in dry-run mode unless live mode is explicitly enabled with --apply or PD_APPLY=true.