π Scripting
One-shot output with incidents list, JSON records, the services list and the exit codes.
incidents list
incidents list prints the status once and exits. Each service is one line, as the interactive list draws it: the name, the status, how long the trouble has run, then the headline. The declared-status note and the hint for more follow on lines of their own.
GitHub β minor 1h 12m Elevated API errors
Cloudflare β ok
npm β ok
Declared status only: green is not proof your calls work.
incidents list <service> for detail.With a service id or alias it prints that service in full: its name on the first line, what it declares and where, then its open incidents and its components as two tables, and its history.
incidents list
incidents list githubThe same static output is what incidents and incidents <service> print when there is no terminal on stdin or stdout, or CI is set. Colour and links are used only when stdout is a terminal and NO_COLOR is unset; links are OSC 8 hyperlinks, which terminals without support print as plain text.
JSON
Add --json to any form for JSON records. It never opens the interactive view.
incidents list --json
incidents list github --jsonincidents list --json prints an array, worst first. With a service, it prints one record with its history loaded.
{
"id": "github",
"name": "GitHub",
"url": "https://www.githubstatus.com",
"kind": "statuspage",
"fetched": "ok",
"indicator": "minor",
"description": "Partially Degraded Service",
"components": [{ "name": "API", "status": "degraded_performance" }],
"active": [
{
"title": "Elevated API errors",
"link": "https://stspg.io/abc",
"date": "2026-01-01T10:00:00Z",
"impact": "minor"
}
],
"recent": [],
"upcoming": [],
"historyLoaded": false,
"historyFailed": false,
"note": ""
}| Field | Meaning |
|---|---|
kind | statuspage, rss, slack, aws or link |
fetched | ok, or failed when the page could not be read |
indicator | critical, major, unknown, minor, maintenance, none or link, worst first in that order |
description | The vendor's own summary line |
components | Components with their raw vendor status; operational ones are included |
active | Incidents open now |
recent | Past incidents, newest first; empty until history is loaded |
upcoming | Scheduled maintenance still to come; empty until history is loaded |
historyLoaded | true once history was requested for this record |
historyFailed | true when the history feed could not be read, so an empty recent claims nothing |
note | The service's configured note, or an empty string |
unknown is the JSON name for what the screen shows as ? unreadable: the page could not be read. It sorts above every healthy row and fails the exit code.
For example, to list only the services in trouble:
incidents list --json | jq -r '.[] | select(.indicator != "none" and .indicator != "link" and .indicator != "maintenance") | .id'Exit codes
| Code | Meaning |
|---|---|
| 0 | All clear: none, maintenance and link count as clear |
| 1 | Something is degraded, or a page could not be read |
| 2 | Usage: an unknown service, flag or value, or a bad config |
A typo is never read as an outage: every usage error exits 2, never 1. incidents --help lists the codes too. The interactive view and incidents watch exit 0 when stopped. With no services configured, incidents list prints No services configured. and exits 0.
if ! incidents list >/dev/null; then
echo "a vendor is declaring trouble"
fiincidents services
incidents services prints the configured services, one per line, as tab-separated id, name and aliases (comma-separated). It is the quickest way to see which ids and aliases incidents <service> accepts.
incidents services | cut -f1