OpenStatus CLI#
Manage status pages, monitors, and incidents from the terminal.
Installation#
Homebrew#
brew install openstatusHQ/cli/openstatus --cask
macOS / Linux#
curl -fsSL https://raw.githubusercontent.com/openstatusHQ/cli/refs/heads/main/install.sh | bash
Windows#
iwr https://raw.githubusercontent.com/openstatusHQ/cli/refs/heads/main/install.ps1 | iex
Quick Start#
# Authenticate with your API token
openstatus login
# List your monitors
openstatus monitors list
# Get detailed info on a monitor (live status + latency percentiles)
openstatus monitors info 123
# Trigger an on-demand check
openstatus monitors trigger 123
# Report an incident
openstatus status-report create --title "API degradation" --status investigating --page-id 1
# Run synthetic tests from config
openstatus run
Commands#
| Command | Alias | Description |
|---|---|---|
login / logout |
Authenticate with the OpenStatus API | |
whoami |
w |
Show current workspace info |
monitors |
m |
List, inspect, trigger, import, and apply monitors |
status-report |
sr |
Create and manage incident reports |
maintenance |
mt |
Schedule and manage maintenance windows |
status-page |
sp |
View status pages and components |
notification |
n |
View notification channels |
run |
r |
Run synthetic tests across global regions |
terraform generate |
tf gen |
Export workspace resources to Terraform HCL |
Global Flags#
| Flag | Description |
|---|---|
--json |
Machine-readable JSON output |
--quiet, -q |
Suppress non-error output |
--debug |
Print HTTP request details to stderr |
--no-color |
Disable colored output |
--access-token, -t |
Override API token |
Monitors as Code#
Define monitors declaratively in YAML and sync them with apply:
# Export existing monitors to openstatus.yaml + openstatus.lock
openstatus monitors import
# Preview changes
openstatus monitors apply --dry-run
# Apply changes
openstatus monitors apply
Terraform Export#
Generate Terraform HCL for your entire workspace:
openstatus terraform generate --output-dir ./terraform
This creates provider.tf, monitors.tf, notifications.tf, status_pages.tf, and imports.tf ready for terraform plan.
Authentication#
The CLI resolves your API token in this order:
--access-token/-tflagOPENSTATUS_API_TOKENenvironment variable- Saved token at
~/.config/openstatus/token(written byopenstatus login)
Development#
Run Tests#
go test -race ./...
Generate Documentation#
go run cmd/docs/docs.go
cd docs
pandoc -s -t man openstatus-docs.md -o openstatus.1