> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incident.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the incident.io CLI

> Manage incidents, alerts, schedules, and more from your terminal with inc, the official incident.io command-line interface.

`inc` is the official command-line interface for the incident.io API. Use it to list and manage incidents, page people, inspect schedules, and script against your incident data without leaving the terminal. It's built for both humans and LLM agents: every command supports JSON output, and the full command schema is machine-discoverable.

The CLI is open source at [github.com/incident-io/inc](https://github.com/incident-io/inc).

**Note that we recommend the [MCP](/ai/remote-mcp) as the primary integration tool**.

## Install

```bash theme={null}
# Homebrew
brew install incident-io/tap/inc

# mise
mise use -g ubi:incident-io/inc
```

Or download a binary for your platform from [GitHub Releases](https://github.com/incident-io/inc/releases).

## Authenticate

Create an API key in [Settings → API keys](https://app.incident.io/~/settings/api-keys), then either export it or save it to the CLI's config:

```bash theme={null}
# Option 1: environment variable
export INCIDENT_API_KEY=inc_abc123...

# Option 2: save to config
inc auth login
```

Verify it works:

```bash theme={null}
inc auth status
```

The CLI can only do what the API key allows, so scope keys to what your scripts need. Read-only keys are a good default for reporting and exploration.

## Everyday commands

```bash theme={null}
# What's live right now
inc incidents list --status-category live

# Create an incident
inc incidents create --name "Database outage" --visibility public --severity-id 01ABC...

# Page someone
inc escalations create --title "Database latency spike" --escalation-path-id 01ABC...

# Who's on call for a schedule
inc schedules entries 01ABC... --from 2026-07-20T00:00:00Z --until 2026-07-21T00:00:00Z

# Pull a post-mortem as markdown
inc post-mortems content 01ABC... > postmortem.md
```

Run `inc --help` for the full command list, covering incidents, alerts, catalog, escalations, schedules, severities, users, roles, custom fields, post-mortems, and follow-ups.

## Scripting and JSON output

When you pipe output, the CLI automatically switches to JSON. Use the built-in `--jq` flag to filter responses without installing anything else:

```bash theme={null}
# Closed incidents this month, counted by severity
inc incidents list --status-category closed --jq 'group_by(.severity.name) | map({severity: .[0].severity.name, count: length})'

# Just the fields you need
inc incidents list --fields id,name,reference --output json
```

Errors are structured JSON too, with a `retryable` field to gate retries on and a `request_id` you can share with our support team. Rate-limited requests retry automatically.

## Call any endpoint

If a dedicated command doesn't exist yet, `inc api` can call any endpoint in the [API reference](https://docs.incident.io/api-reference) with authentication pre-configured:

```bash theme={null}
inc api GET /v2/incidents --field 'status_category[one_of]=live' --jq '.incidents[].name'
inc api GET /v2/alerts --paginate --jq '.alerts[].title'
```

## For LLM agents

The CLI supports agent use as well. `inc describe` outputs a JSON schema of every command and flag, and `--dry-run` previews any request without sending it:

```bash theme={null}
inc describe incidents.create
inc incidents create --name "Test" --visibility public --dry-run
```

See [AGENTS.md](https://github.com/incident-io/inc/blob/master/AGENTS.md) in the repository for detailed agent integration guidance.
