OpenSRE CLI Setup
Set up or maintainopensre with minimal friction. If you are running this prompt, follow the steps below and set up OpenSRE for the user so they can investigate incidents from the CLI or the interactive shell.
Do not clone the OpenSRE repo unless the user asked to contribute. The published CLI is enough.
Step 1: Install or upgrade the CLI
Check whether the CLI exists:opensre is missing, install with one of these methods. Prefer the one-line installer unless the user already uses Homebrew.
- macOS / Linux (one-line installer):
OPENSRE_AUTO_LAUNCH=0 skips auto-starting the onboard wizard so you can run the remaining steps yourself.
- macOS (Homebrew):
- Windows (PowerShell):
PATH, it puts the binary in ~/.local/bin and prints the command to add that directory. Apply that PATH update (or open a new terminal), then re-check command -v opensre.
When opensre is already present, upgrade it:
Step 2: Onboard
Onboard is interactive and needs a TTY. Do not try to fake the wizard. Run it and prompt the user when it asks for input:- An LLM — OpenAI, Anthropic, a local model (Ollama), or another provider they already use. They need an API key, or they can leave the key blank and add it later with
opensre auth login <provider>. - Tools — whatever investigations should query (Datadog, Grafana, Slack, and so on). Skip any they do not have.
- Optional extras — masking and messaging.
<service> with a slug such as datadog, grafana, or slack.
If onboard cannot reach the LLM provider (firewall, proxy, offline), tell the user they can Save anyway without validating and continue. If it cannot persist the key, they can Continue without saving (this session only) and re-enter it next time.
Step 3: Verify
opensre integrations setup <service> for that tool.
Step 4: Suggest a first run
Prefer the interactive shell unless the user already has an alert file:/help.
If they have an OpenSRE git checkout, they can run the sample alert from the repo root:
Gotchas
opensre: command not found— new terminal, or add the bin directory the installer printed (often~/.local/binon macOS/Linux).- Onboard blocks or looks hung — it is waiting on the user. Show them the prompt; do not kill it.
- Installer started onboard on its own — that is expected without
OPENSRE_AUTO_LAUNCH=0. Let the user finish it, then continue from Step 3. - Investigations need a configured LLM —
opensre investigatefails at startup withoutLLM_PROVIDERand a matching key. Finish onboard oropensre auth login <provider>first. - Only connected tools are queried — a Datadog alert cannot be investigated if Datadog was never set up. Run
opensre integrations verifybefore a production run.