A PagerDuty terminal user interface focused on common SRE tasks.
- View and manage PagerDuty incidents with team and individual views
- Acknowledge, re-escalate, silence, and merge incidents with confirmation prompts
- Open SOP/runbook links and incidents directly from alerts
- Log into clusters via ocm-container or ocm backplane with multi-cluster selection
- Add notes, auto-refresh with selection preservation, auto-acknowledge when on-call
- Background data freshness: incident details, alerts, and notes are cached and automatically re-fetched when older than five minutes
- PagerDuty environment variables passed automatically to terminal sessions
- Flag conditions: mark incidents matching cluster ID or organization name patterns
- AI agents:
:agentCLI queries and:watcherLLM analysis with ambient incident pattern detection - OCM integration: cluster enrichment with display names, service logs, limited support history
- Backplane integration: CORA cluster diagnostic reports via backplane API
- 8-tab incident viewer: Details, Alerts, Notes, Cluster, SLs, LS History, Reports, PD History
- Auto-update notification and
srepd updateself-update command - Full configuration reference
make install # install to $GOPATH/bin
# or
go install . # standard go install- Create a PagerDuty API User Token: PagerDuty web → My Profile → User Settings → API Access → Create New API User Token.
- Run
srepd— the setup wizard does the rest: it validates your token, discovers your teams and escalation policies, detects your terminal and editor, and drops you straight into the live incident view when you save.
That's it. Your team may also publish a preset with its policy decisions — if so, run srepd config --preset <url> from your team's onboarding docs instead. See docs/presets.md for details.
| Command | Description |
|---|---|
srepd |
Start the TUI |
srepd update |
Update to the latest release in place |
srepd --version |
Print version and git SHA |
srepd --dev |
Run with fixture data (no PD connection) |
srepd config |
Interactive configuration wizard (--preset <file|https-url> to pre-seed from a team preset) |
srepd config generate |
Print a complete annotated config with defaults (--out <path> to write a file) |
SREPD reads ~/.config/srepd/srepd.yaml and supports SREPD_ environment variable prefix. Run srepd config to create or update your config interactively. Values from environment variables (e.g., SREPD_TOKEN) are pre-filled automatically.
If no config file exists — or the config file is incomplete or still contains placeholder values — running srepd automatically enters the configuration wizard. The wizard validates your token, greets you by name, auto-selects your team when you belong to exactly one, and gates advanced options (custom service-to-policy mappings) behind a default-No confirm so most users never see them. New config files are written using the same annotated template as srepd config generate — with section headers, detected terminal alternatives as comments, and environment-aware defaults. The form resizes dynamically when the terminal window changes size.
Migrating from old config format: If your config uses the deprecated service_escalation_policies key, running srepd config will automatically migrate to the new default_silent_escalation_policy and custom_service_escalation_policies keys. The old block is commented out with a deprecation note.
Team presets: srepd config --preset <file|https-url> pre-seeds the wizard from a team-published YAML fragment carrying team policy decisions — teams, default_silent_escalation_policy, custom_service_escalation_policies, cluster_login_command, and optionally terminal/editor. Presets can never set token or llm_api credentials, only fill values you haven't configured, and every value is still confirmed in the wizard. URL fetches are HTTPS-only and size-capped. Teams can publish one preset link in their onboarding docs to eliminate the ID scavenger hunt for new members.
Because terminal, editor, and cluster_login_command are commands srepd executes, a preset that seeds any of them triggers an extra safety gate after the final "Save changes?" confirmation: a bold red warning listing every preset-supplied command for review, followed by an explicit "Are you sure you trust the source?" confirmation showing the preset file or URL. Both default to No, and declining either discards all changes. Values you type yourself, and preset fields that are only PagerDuty IDs (teams, policies, mappings), never trigger the gate.
| Key | Type | Description |
|---|---|---|
token |
string |
PagerDuty API OAuth token |
teams |
[]string |
PagerDuty team IDs |
| Key | Type | Default | Description |
|---|---|---|---|
default_silent_escalation_policy |
string |
(none) | Silent escalation policy ID for silencing incidents. The wizard fetches policies from all your PagerDuty teams and marks ones with no on-call schedules as candidates ("does not page"); you can also skip or enter an ID manually. |
custom_service_escalation_policies |
map[string]string |
(none) | Per-service silent policy overrides (service ID to policy ID) |
editor |
string |
vim |
Editor for incident notes (wizard prefills from $EDITOR/$VISUAL) |
terminal |
string |
gnome-terminal -- |
Terminal emulator for cluster login (wizard detects installed terminals and warns when the configured one is missing) |
cluster_login_command |
string |
ocm backplane login %%CLUSTER_ID%% |
Cluster login command |
rosa_boundary_command |
string |
rosa-boundary start-task --cluster-id %%CLUSTER_ID%% --connect |
rosa-boundary cluster login command (opens in a new terminal window, like cluster_login_command) |
toolbox_mode |
string |
auto |
Toolbox detection: auto, true, or false |
chord_prefix |
string |
ctrl+x |
Prefix key for chord commands |
agent_cli_command |
string |
claude --print |
CLI agent command for :agent queries (set to "" to disable AI features) |
emoji |
bool |
true |
Use emoji markers or text fallbacks for flags/agent/watcher |
reescalate_level |
int |
2 |
Escalation level ctrl+e re-escalates to, skipping lower placeholder tiers (e.g. level 1 "Nobody") |
stream_responses |
bool |
true |
Stream :watcher and :agent responses token-by-token (:watcher requires a streaming-capable provider; :agent auto-detects Claude CLI); set false for blocking responses |
agent_system_prompt |
string |
(read-only investigation) | System prompt for :agent CLI queries |
watcher_system_prompt |
string |
(SRE assistant) | System prompt for :watcher LLM queries |
colors |
map[string]string |
(defaults) | Custom color scheme (hex values) |
See docs/configuration.md for the full reference including CLI arguments.
All color keys are optional. Unspecified keys use defaults. Values must be hex colors (e.g., #778da9). See docs/colors.md for color key descriptions and pre-built palettes (Nord, Catppuccin Latte).
colors:
text: "#778da9" # Normal text, table rows
border: "#415a77" # Borders, tab outlines, separators
highlight: "#ffffff" # Headers, selected row text, active tab
selected: "#415a77" # Selected row background
warning: "#a4133c" # Warning/confirmation prompts
error: "#0d1b2a" # Error modal background
muted: "#5C5C5C" # Muted text (version, incident ID)
tab: "#7D56F4" # Reserved for future usePrefer editing a file over the wizard? Generate a complete, annotated config with every supported key and its default:
srepd config generate --out ~/.config/srepd/srepd.yamlThen fill in token and teams. Do not copy placeholder values like <PagerDuty API token> into the file — srepd treats them as unconfigured and routes you into the wizard. A minimal working config looks like:
token: u+yourRealTokenHere
teams:
- PABC123
default_silent_escalation_policy: P654321
terminal: gnome-terminal --
cluster_login_command: ocm backplane login %%CLUSTER_ID%%
rosa_boundary_command: rosa-boundary start-task --cluster-id %%CLUSTER_ID%% --connect
toolbox_mode: autoUse %%CLUSTER_ID%% and %%INCIDENT_ID%% as placeholders in terminal or cluster_login_command for dynamic substitution at launch time. If %%CLUSTER_ID%% is not present in cluster_login_command, the cluster ID is appended automatically.
Terminal profiles are auto-detected from the executable name or Flatpak app ID. Set only the terminal name in your config; the correct argument style is handled automatically.
Supported terminals: gnome-terminal, ptyxis, wezterm, blackbox, tmux, konsole, alacritty, ghostty, terminator, kitty, foot, contour, iterm2, macOS Terminal
Flatpak-installed terminals are also supported using their application ID (e.g., org.kde.konsole).
When running inside a Fedora Toolbox, terminal commands are automatically prefixed with flatpak-spawn --host (controlled by toolbox_mode).
SREPD enriches PagerDuty incident data with cluster details from the OpenShift Cluster Manager (OCM) API. On startup, it connects to the production OCM API using tokens from ~/.config/ocm/ocm.json. If tokens are expired, a browser window opens for auth code login in the background — the TUI starts immediately with PagerDuty incidents visible, and OCM enrichment populates once authentication completes. OCM authentication is skipped while the configuration wizard is on screen (srepd config and first-run setup) so new users aren't interrupted before saving a token; it runs automatically as soon as the wizard completes and the live session begins.
Enriched data includes:
- Cluster display names replace PD service names in the incident table (e.g.,
mycluster.abc1.p1.example.orginstead ofosd-mycluster.abc1.p1.example.org-hive-cluster) - Impacted Clusters section on the Details tab lists all clusters in the incident
- Cluster tab shows OCM cluster details: name, ID, state, region, provider, version, CCS, Hypershift
- Service Logs tab shows recent service logs per cluster
- Limited Support History tab shows LS reasons per cluster
- Reports tab shows CORA cluster diagnostic reports from the backplane API
- Multi-cluster incidents show
(+N)in the service column
OCM features are optional — if OCM is not configured, the remaining TUI functions normally.
The Reports tab requires ~/.config/backplane/config.json (standard backplane-cli config). The backplane URL is resolved from OCM environment metadata. If the config file is missing, the tab shows a message indicating backplane is not enabled.
SREPD supports configurable LLM providers for AI-assisted incident analysis and an ambient watcher that detects cross-incident patterns. Configuration is entirely optional — AI features are disabled when unconfigured. See docs/ai-agents.md for usage and docs/llm-providers.md for provider setup.
Use :agent <query> for CLI agent queries and :watcher <query> for LLM analysis. Press w to toggle the watcher pane.
Add to ~/.config/srepd/srepd.yaml:
llm_api:
provider: ollama
model: llama3.1:8b| Provider | Endpoint Default | Description |
|---|---|---|
ollama |
http://localhost:11434 |
Local Ollama daemon (or ollama-container) |
anthropic |
SDK default | Anthropic Messages API (direct API key) |
anthropic-vertex |
auto | Anthropic via Google Cloud Vertex AI (uses Application Default Credentials) |
anthropic-bedrock |
auto | Anthropic via AWS Bedrock (uses AWS default credential chain) |
openai |
(user must specify) | Any OpenAI-compatible endpoint (vLLM, TGI, internal models) |
ramalama |
http://localhost:8080 |
Red Hat RamaLama server |
| Key | Type | Description |
|---|---|---|
llm_api.provider |
string |
Provider name: ollama, anthropic, anthropic-vertex, anthropic-bedrock, openai, ramalama |
llm_api.endpoint |
string |
API endpoint URL (provider-specific default used if omitted) |
llm_api.model |
string |
Model identifier (provider-specific default used if omitted) |
llm_api.api_key_env |
string |
Name of env var containing API key (optional for all providers) |
llm_api.region |
string |
Cloud region for anthropic-vertex (auto-detected from CLOUD_ML_REGION or VERTEXAI_LOCATION). Not used for anthropic-bedrock — its region comes from the AWS SDK environment |
llm_api.project_id |
string |
GCP project for anthropic-vertex (auto-detected from ANTHROPIC_VERTEX_PROJECT_ID, VERTEXAI_PROJECT, or GOOGLE_CLOUD_PROJECT) |
AWS Bedrock: export your AWS credentials and region in the environment (
AWS_PROFILE/AWS_REGION) — none go in the config. Or authenticate with a Bedrock API key by exportingAWS_BEARER_TOKEN_BEDROCK(plusAWS_REGION) instead of IAM credentials. Enable Anthropic models once in the AWS Bedrock console, and setmodelto an inference-profile ID such asus.anthropic.claude-sonnet-4-6(bare foundation-model IDs are not on-demand invocable). See LLM Providers for full setup.
Press h to toggle the help overlay inside srepd.
| Key | Action | Key | Action |
|---|---|---|---|
j/k |
Move down/up | a |
Acknowledge |
g/G |
Jump to top/bottom | n |
Add note |
Enter |
View incident | l |
Login to cluster |
Esc |
Go back | o |
Open in browser |
h |
Toggle help | s |
Open SOP link |
t |
Toggle team/individual | ctrl+s |
Silence |
r |
Refresh | ctrl+e |
Re-escalate |
ctrl+r |
Toggle auto-refresh | u |
Toggle urgency filter |
ctrl+a |
Toggle auto-acknowledge | ctrl+l |
View debug log |
ctrl+q/ctrl+c |
Quit | 1-9 |
Select cluster |
:// |
Command input | m |
Merge incident |
w |
Toggle watcher pane | ctrl+t |
Add tags to incident |
ctrl+x + key |
Chord commands | ctrl+x ? |
Show chord help |
Tab/Shift+Tab/←/→ |
Switch tabs (incident view) | ↑/↓ |
Scroll within tab |
Chord commands use a configurable prefix (default ctrl+x) followed by a second key. Set chord_prefix in config to change.
SREPD supports rosa-boundary as
an alternative cluster login method. Use ctrl+x b to open a rosa-boundary session
for the selected incident's cluster. The default command is
rosa-boundary start-task --cluster-id %%CLUSTER_ID%% --connect. Override via the
rosa_boundary_command config key or SREPD_ROSA_BOUNDARY_COMMAND environment variable.
rosa-boundary launches an interactive session into a protected cluster exactly
like ocm-container, and behaves identically to cluster_login_command: the
session opens in a new terminal window, SREPD keeps running, and multiple
concurrent sessions are supported. The same PagerDuty context passed to
ocm-container sessions (the PAGERDUTY_* environment variables below) is passed
to rosa-boundary sessions; unsupported variables are simply ignored. In toolbox
mode the terminal launches on the host via flatpak-spawn --host, the same
convention as the cluster login path.
When using ocm-container, PagerDuty context is passed automatically as environment variables:
| Variable | Description |
|---|---|
PAGERDUTY_INCIDENT_ID |
Incident ID |
PAGERDUTY_INCIDENT_TITLE |
Incident title (sanitized) |
PAGERDUTY_INCIDENT_URL |
Direct link to the incident |
PAGERDUTY_INCIDENT_SERVICE |
Service name |
PAGERDUTY_INCIDENT_URGENCY |
high or low |
PAGERDUTY_INCIDENT_STATUS |
triggered, acknowledged, or resolved |
PAGERDUTY_CLUSTER_ID |
Selected cluster ID |
PAGERDUTY_ALERT_COUNT |
Number of matching alerts |
PAGERDUTY_ALERT_NAMES |
Comma-separated alert names |
PAGERDUTY_ALERT_LINKS |
Comma-separated SOP/runbook links |
PAGERDUTY_NOTES_EXIST |
true or false |
PAGERDUTY_NOTE_COUNT |
Number of notes |
PAGERDUTY_CLAUDE_AVAILABLE |
true when Claude Code is detected on PATH |
REASON |
Incident URL (for compliance/audit) |
For non-ocm-container terminals, environment variables are set on the process directly or passed via flatpak-spawn --env= when in toolbox mode.
| Command | Purpose |
|---|---|
make build |
Build via goreleaser snapshot |
make install |
Install to $GOPATH/bin |
make test |
Run unit tests |
make lint |
Run golangci-lint |
make vet |
Run go vet |
make fmt |
Format code |
make fmt-check |
Check formatting (CI-friendly) |
make coverage |
Generate coverage report |
make test-all |
Run all checks: fmt-check, vet, lint, test |
make plan-check |
Verify plan document exists for branch |
make clean |
Remove build artifacts |
make help |
Show all available targets |
PRs follow TDD workflow and require a plan document in docs/plans/. Run make test-all before pushing.
MIT License. See LICENSE for details.
Portions of this codebase were developed with the assistance of AI tools, including Claude by Anthropic. To the extent that AI-generated contributions are subject to copyright and capable of being licensed under applicable law, such contributions are licensed under the same MIT License terms stated above. The legal status of AI-generated code remains an evolving area of law, and this notice is provided in the interest of transparency. All AI-assisted contributions have been reviewed and approved by the project maintainers.
