| name | rootly-cli |
| description | Manage Rootly incidents, alerts, services, teams, and on-call schedules from the terminal using the Rootly CLI |
Rootly CLI
Use the rootly CLI to manage Rootly resources directly from the terminal. The CLI follows the pattern rootly <resource> <verb>.
Prerequisites
The CLI must be installed and configured before use:
brew install rootlyhq/tap/rootly-cli
go install github.com/rootlyhq/rootly-cli/cmd/rootly@latest
Configure authentication with either:
API keys are created in the Rootly dashboard under Settings > API Keys.
Commands Reference
Incidents
rootly incidents list
rootly incidents list --status=started --severity=critical
rootly incidents get <id>
rootly incidents create --title="Database outage" --severity=critical
rootly incidents update <id> --status=mitigated
rootly incidents delete <id>
Alerts
rootly alerts list
rootly alerts list --source=datadog
rootly alerts get <id>
rootly alerts create --summary="High CPU usage" --source=datadog
rootly alerts ack <id>
rootly alerts resolve <id>
Services
rootly services list
rootly services list --name=api
rootly services get <id>
rootly services create --name="api-gateway"
rootly services update <id> --description="Main API gateway"
rootly services delete <id>
Teams
rootly teams list
rootly teams get <id>
rootly teams create --name="Platform"
rootly teams update <id> --color="#FF5733"
rootly teams delete <id>
On-Call
rootly oncall list
rootly oncall shifts
rootly oncall shifts --days=14
rootly oncall who
Output Formats
The CLI supports multiple output formats via the --format flag:
- table (default in terminal) - human-readable table
- json (default when piped) - machine-readable JSON
- yaml - YAML output
- markdown - markdown tables for documentation or LLM consumption
rootly incidents list --format=json | jq '.[] | .title'
rootly incidents get <id> --format=yaml
rootly incidents list --format=markdown
The CLI auto-detects TTY: it uses table format in a terminal and JSON when output is piped.
Pagination and Filtering
rootly incidents list --limit=50 --page=2
rootly incidents list --sort=created_at --order=desc
Common Workflows
Triage an active incident
rootly incidents list --status=started --severity=critical
rootly incidents get <id>
rootly incidents update <id> --status=mitigated
Acknowledge and resolve alerts
rootly alerts list
rootly alerts ack <id>
rootly alerts resolve <id>
Check who's on-call
rootly oncall who
rootly oncall shifts --days=7
Command Aliases
incidents can also be written as incident
services can also be written as service or svc
Important Notes
- Delete operations prompt for confirmation before executing
- Update commands only send fields that were explicitly changed via flags
- Pagination info is printed to stderr, data to stdout (safe for piping)