A GitHub CLI extension for interacting with PagerDuty.
Check on-call status, view schedules, list incidents, and more — all from the terminal.
gh extension install maxbeizer/gh-pagerdutyConfiguration can be set via environment variables or a config file. Environment variables always take precedence.
export PAGERDUTY_API_TOKEN="your-token-here"
export PAGERDUTY_API_HOST="https://api.eu.pagerduty.com" # optional, for EU accountsCreate ~/.config/gh-pagerduty/config.yml, or run gh pagerduty setup for interactive configuration:
api_token: your-token-here
api_host: https://api.pagerduty.com # optional, defaults to US
# Scope commands to resources you care about (optional)
# These are used as defaults — CLI flags always override them.
schedule_ids:
- SCHEDULE_ID_1
- SCHEDULE_ID_2
service_ids:
- SERVICE_ID_1
team_ids:
- TEAM_ID_1Get a token at: PagerDuty API Access Keys
For EU accounts, also set:
export PAGERDUTY_API_HOST="https://api.eu.pagerduty.com"Or add api_host to your config file (see above).
gh pagerduty oncall # Am I currently on call?
gh pagerduty oncall --all # Who is on call across all schedules?
gh pagerduty oncall --next # Calendar view of your upcoming shifts (next 30 days)
gh pagerduty oncall --schedule SCHED_ID # Who is on call for a specific schedule?
gh pagerduty oncall --level 0 # Show all escalation levels (default: L1 only)
gh pagerduty oncall --json # Machine-readable outputExample --next output:
📅 Your on-call shifts (next 30 days)
Week of Mar 10 – Mar 16
Mon Mar 10 09:00 – Tue Mar 11 09:00 (1d) Primary On-Call
Thu Mar 13 17:00 – Fri Mar 14 09:00 (16h) After-Hours
Week of Mar 24 – Mar 30
Mon Mar 24 09:00 – Tue Mar 25 09:00 (1d) Primary On-Call
gh pagerduty schedule list # List all schedules
gh pagerduty schedule show SCHED_ID # Show schedule details & upcoming shifts
gh pagerduty schedule show SCHED_ID --since 2025-01-01T00:00:00Z --until 2025-01-08T00:00:00Zgh pagerduty incidents # List open incidents
gh pagerduty incidents --status resolved # List resolved incidents
gh pagerduty incidents --urgency high # Only high-urgency
gh pagerduty incidents --service SVC_ID # Filter by service
gh pagerduty incidents --since 2025-01-01T00:00:00Zgh pagerduty services # List all services
gh pagerduty services --team TEAM_ID # Filter by teamgh pagerduty me # Show your PagerDuty user infogh pagerduty versionmake help # see all targets
make build # build binary
make test # run tests
make ci # build + vet + test-race
make install-local # install extension from checkout
make relink-local # reinstall after changesTag a version to trigger a release build:
git tag v0.1.0
git push origin v0.1.0The GitHub Actions workflow uses goreleaser to build binaries for darwin/linux (amd64/arm64) and create a GitHub release. Once released, users install with:
gh extension install maxbeizer/gh-pagerduty