CLI reference
CLI reference
Every command, environment variable and exit code.
Commands
| Command | Does |
|---|---|
logstreem login | Authorise the CLI and store a token |
logstreem logout | Remove a stored credential |
logstreem whoami | Active profile, scopes and organisation |
logstreem ingest <dataset> | Pipe events in from stdin or files |
logstreem query | Run LSQL |
logstreem tail <dataset> | Follow a live stream |
logstreem datasets ls|create|get|fields|trim|rm | Manage datasets |
logstreem monitors ls|apply|mute|rm | Manage alerting rules |
logstreem notifiers ls|create|rm | Manage alert destinations |
logstreem dashboards ls|get|apply | Dashboards as code |
logstreem tokens ls|create|rm | Manage API tokens |
logstreem annotate <title> | Mark a deploy on every chart |
logstreem open | Open the console in a browser |
logstreem version | Print version and check for updates |
Environment variables
| Variable | Effect |
|---|---|
LOGSTREEM_TOKEN | API token. Takes precedence over the config file |
LOGSTREEM_PROFILE | Profile to use when --profile is absent |
LOGSTREEM_DATASET | Default dataset for ingest and tail |
LOGSTREEM_API_URL | Override the base URL, for a self-hosted proxy |
LOGSTREEM_CONFIG | Config file path. Default ~/.logstreem/config.toml |
NO_COLOR | Any value disables ANSI colour |
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Generic failure |
2 | Bad usage — unknown flag, missing argument |
3 | Not authenticated, or the token was revoked |
4 | API returned 4xx — including a query that would not parse |
5 | API returned 5xx, or the network failed |
6 | Rate limited after exhausting retries |
Stable across releases
Exit codes and
--json output shapes are part of the contract. set -e behaves predictably, and a CI script written today keeps working.