Better Stack CLI

Manage monitors, incidents, on-call, status pages, telemetry, dashboards, error tracking and everything else in the Better Stack API from your terminal with betterstack, the Better Stack CLI.

Install the CLI

macOS and Linux Windows
curl -fsSL https://betterstack.sh | sh
irm https://betterstack.sh/install.ps1 | iex

Sign in

Sign in with your browser
betterstack signin

Once signed in, the CLI can view and change everything your role allows in the web app.

Run your first command

Start with what's happening right now: your latest incidents.

List incidents
betterstack incident list

Open one to see its cause, who acknowledged it and the failing check's response.

Get an incident
betterstack incident get 123456789

Then see who's on call to handle it.

See who's on call
betterstack on-call-schedule list

To catch the next outage earlier, add a monitor.

Create a monitor
betterstack monitor create --monitor-type status --url https://example.com

Look at your logs next. tail follows a source as lines arrive.

Follow logs
betterstack tail 123456 -f

console opens a SQL console over the same source.

Query logs with SQL
betterstack console 123456 --start-time now-24h

Every list comes as a table. Add --json for scripts.

Print JSON
betterstack incident list --json

Add --help to list every command, what it does and how to use it.

Get help
betterstack --help
betterstack monitor create --help

Connect your AI assistant

betterstack mcp install adds the Better Stack MCP server to Claude Code, Codex, OpenCode or Cursor.

Move from the old Terraform providers

betterstack terraform migrate moves Terraform state from the better-uptime and logtail providers to the betterstack provider. Follow the steps on the Terraform page.

Authentication

Sign in to Better Stack in your browser. The sign-in is saved on your computer, in the keychain on macOS and in a file in your user folder on Linux and Windows. To use an API token instead, create a global API token in Better Stack → API tokens → Global tokens⁠ and set the BETTERSTACK_API_TOKEN environment variable to it.

  • betterstack whoami: Show who is signed in and the teams they can access.
  • betterstack signout: Sign out and remove the saved sign-in.
  • betterstack signin: Sign in to Better Stack.

Install location and updates

Installed into ~/.local/bin on macOS and Linux, /usr/local/bin for root, and %LOCALAPPDATA%\Programs\BetterStack on Windows. New endpoints and fields of the Better Stack API reach the CLI as soon as they're published. Once a day, betterstack says when a newer version of the CLI is out: run betterstack update to get it.