Explore documentation
Better Stack CLI
The Better Stack CLI, betterstack, runs the Better Stack API from your terminal. It covers monitors, incidents, on-call, status pages, telemetry, dashboards, error tracking and the rest of the Better Stack API.
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, set the BETTERSTACK_API_TOKEN environment variable to a global API token from Better Stack β API tokens β Global tokens
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
It installs without asking, into ~/.local/bin on macOS and Linux, /usr/local/bin for root, and %LOCALAPPDATA%\Programs\BetterStack on Windows. The CLI picks up new commands on its own as soon as they're published, and says once a day when a newer CLI is out. Run betterstack update to update it.