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
Sign in
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.
Open one to see its cause, who acknowledged it and the failing check's response.
Then see who's on call to handle it.
To catch the next outage earlier, add a monitor.
Look at your logs next. tail follows a source as lines arrive.
console opens a SQL console over the same source.
Every list comes as a table. Add --json for scripts.
Add --help to list every command, what it does and how to use it.
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.