Skip to main content
Start the shell with opensre (needs a real terminal). Type a /command, or describe what you want in plain language.
Type / to open the command tray attached to the input. Browse with the arrow keys and use Enter or Tab on a command with subcommands to add the separating space and open its subcommand tray. Enter runs a final command selection. Esc closes the tray without clearing your draft or stopping running work. On narrow terminals, the highlighted command’s description appears below the list.
Confirmation prompts come from /auto (tool-approval autonomy) and from elevated slash commands. Default /auto is high (alpha: no tool prompts). /trust on skips approval prompts for the rest of the session. Outside a TTY, actions that would ask are blocked.

How the REPL works

Shell command syntax

shell_run uses the command shell of the environment where OpenSRE is running:
  • Native Windows uses cmd.exe. Use cmd operators (&, &&, and |), %NAME% environment variables, and caret escaping (^). PowerShell syntax is not translated; invoke powershell -NoProfile -Command "..." or pwsh -NoProfile -Command "..." explicitly when you need it.
  • macOS, Linux, and OpenSRE running inside WSL use non-interactive /bin/sh. WSL therefore expects POSIX syntax, not native Windows syntax.
Each shell_run call starts in OpenSRE’s working directory with a fresh child shell. A cd affects only that call; prefix every command that needs another directory with cd <path> && ... (cd /d <path> && ... in native Windows when the path may be on another drive). The exact command pwd works on every platform and prints that call’s starting directory. TTY vs non-TTY: Interactive menus, confirmations, and onboarding wizards need a real terminal. Piping input or running in CI is non-interactive — prefer explicit CLI commands outside the REPL for automation. Unknown commands: Typos suggest the closest registered command (Did you mean /integrations?). Run /help for the authoritative list — it always matches your installed OpenSRE version. Keyboard shortcuts: Every launch asks what you want to do: analyze a repository, keep CI/CD healthy automatically, or open the shell. Keeping CI/CD healthy then asks for a local repair, one repair in OpenSRE Cloud, or Slack. A local or cloud repair asks next for permission to create one private demo repository (owner/opensre-ci-repair-demo- plus four characters when your GitHub login is saved). Declining leaves the later repository or pull-request picker. Escape skips the picker. Run opensre --skip-onboarding to open the shell without it. Type /demo to start it later. See CI/CD analytics demo. The banner and prompt show CI/CD fixes: distinct GitHub repairs whose pushed checks passed, including merge-conflict repairs. A repair can count before it is merged; check the target branch before assuming it is green. Fixes in this shell update the prompt immediately. Use /clear to pick up fixes saved by another OpenSRE process in the same deployment. Zero also covers an unavailable count; the total is best-effort and can decrease after restarting if a save failed.

Quick reference

Help and exit

Session

Integrations, models, and tools

Privacy and history

Tasks and background work

Agents and alerts

CLI parity

These commands delegate to the same Click CLI you would run outside the REPL.

System

Commands with interactive menus (TTY)

These invocations open a picker or submenu: /model keeps its menu running: picking show prints the current models and hands you back to the menu, so leave it with done or Esc.

Commands

Help

Help categories mirror the REPL grouping: Quick Access, Session, Integrations/Models/Tools, Privacy, Tasks, Agents, Alerts, CLI parity, and System.Quick Access duplicates frequently used commands (/integrations, /model, /health, /status, /help) for faster discovery in the picker.
Shortcut for /help. Same forms and picker behavior.

Session

Shows a snapshot of the current REPL session:
Typical fields:Use /status for session state. Use /health for integration connectivity.
Shows LLM usage tracked locally for the current REPL session. This is not cloud-provider billing and does not read your vendor invoice.
Example output (measured + estimated mix):
Measured vs estimated:When any estimate is included, the table title notes (includes estimates) and rows show measured vs estimated splits.What increments the counter: Normal LLM chat turns and planner calls. What does not: Non-LLM command handling such as history recall or prompt rendering.Token totals reset on /new or when session identity is rotated. They do not carry across /resume. See Session History.
Shows what the model will receive with your next message, without calling a model:
Below the table: how many messages and turns the history holds and how many of those turns carry tool results, whether a session summary opens it, how many tool schemas go with every call, and how close the history is to compaction (OPENSRE_HISTORY_TOKEN_BUDGET tokens or 60 turns). Past either, older turns are summarized before the next turn; /compact does that now.
Set reasoning depth for OpenAI and Codex providers in this REPL session only.
Bare /effort prints the current level, the config default for your provider/model, and supported choices. /status includes the same field.Other providers (Anthropic, Ollama, etc.) ignore /effort; the shell prints a hint suggesting /model set openai or /model set codex. Set OPENSRE_REASONING_EFFORT in the environment for non-interactive defaults. See LLM providers.
Set how often the REPL asks before running agent tools. Shown on the status line as Auto (Med) · ….
/auto is not a shell-command allowlist: under alpha, shell strings still run when approved (or when High skips the prompt). Lower levels only promote the existing ask confirmation hook by tool_type.With /trust: /trust on skips approval prompts even when /auto would ask. Turn trust off to restore /auto prompts.Session preference only — not restored by /resume. Bare /auto prints the current level, the default, and each caption.
Trust mode skips execution confirmation prompts for elevated commands (/cancel, /uninstall, integration remove, etc.).
In a TTY, bare /trust opens an interactive on/off menu. Trust mode is a session preference — it is not restored by /resume.
Toggle TRACER_VERBOSE logging for the REPL process (deeper internal logs to stderr). Also shows the per-turn tool-call log above each reply; by default it is hidden and only reachable with Ctrl+O.
Clears the terminal and re-renders the OpenSRE banner. Does not reset session state, token usage, LLM conversation context, or accumulated infra context.
Summarizes older conversation context, keeps recent messages, and persists a compaction entry in the session file. Future /resume calls replay the summary before the kept messages.
If there are not enough messages to compact, the command reports nothing to compact. OpenSRE also compacts automatically before a shell turn when the replayed branch context exceeds the runtime threshold.
Browse up to 20 recent sessions stored on disk, newest first:
In a terminal, use ↑/↓ to highlight a session and Enter to resume it. Esc closes the picker. Rows show relative times, and the status line shows the selected session’s ID, start time, duration, and turn count. The current session is marked; the most recent previous session is highlighted by default when one exists.When output is piped, /sessions prints a table instead. Use /resume <id> with the displayed 8-character ID. The current session’s duration updates live.
Restore LLM conversation context and accumulated infra context from a previous session.
Current session: If the ID prefix matches the session you are already in, /resume is a no-op — OpenSRE prints a hint to pick a previous session from /sessions.When you resume a different session, OpenSRE:
  1. Switches the active session file to the target session
  2. Restores cli_agent_messages so the assistant remembers prior turns
  3. Restores accumulated_context keys
  4. Reprints conversation history (user prompts, assistant replies, slash commands)
Compaction entries are replayed as summary messages before the kept branch messages.Restored vs not restored:Warning: Resuming a different session replaces the current session’s LLM context if messages already exist.Session replay reads the current version-2 session tree format. Older session files are ignored by /sessions and /resume. See Session History.
Rotate to a new session file while keeping the current LLM conversation thread and accumulated context.
Use /new after a long /resume so /sessions stays tidy without losing your place in the conversation.
Set a finish line and keep working toward it across turns:
Bare /goal shows the current goal. /goal set starts work immediately. See Goals for the full workflow.

Integrations, models, and tools

Read-only pass/fail report for the local OpenSRE agent, LLM connectivity, and each configured integration.
Runs live verification against the integration store. Use before incidents to confirm Datadog/Grafana/K8s credentials still work. For integration-only checks without the full agent/LLM report, prefer /verify.
Shortcut for integration connectivity checks (same as opensre integrations verify / make verify-integrations).
GitHub setup opens the OpenSRE app, where you connect through OAuth or enter a token. Opening the app leaves setup pending until the connection is refreshed.You can ask “Can you configure Telegram/PostHog for me?” to start the same guided flow. It explains each human action before requesting input, discovers IDs where possible, and lets you retry failed checks. Enter credentials only in the setup flow’s hidden input./integrations list opens a configured-integration browser in a TTY. Use ↑↓ to browse, Enter to verify the selected connection when supported, a to add, s to run setup for the selected integration, and r to remove it with confirmation. Esc closes without changes. Choosing an action returns to the conversation when it finishes.Browsing does not run health checks: Not checked means configuration exists, not that the connection is healthy. Connections without a verifier show Configured and do not offer Enter-to-verify; setup and removal remain available. Use /integrations verify to run health checks.
MCP-capable integrations only (subset of the full integration catalog)./mcp list opens the server browser without running health checks. Use ↑↓ to browse, Enter to verify, a to connect, s to reconfigure the selected server, r to disconnect with confirmation, and Esc to close. Explicit subcommands remain available below.
Show the active hosted model. An authenticated interactive shell is account-managed, so local provider/model changes are locked until sign-out; signing out closes the shell.
Account lock: set, restore, and toolcall set explain that the model is managed by the OpenSRE account and make no change. The account route overrides local provider variables for every model role while the session is signed in.Bare /model: in a terminal this opens a menu rather than printing the table. The menu stays open: show prints the current models and hands you back to it, so leave with done or Esc. set, restore and toolcall close it once the change succeeds. Use /model show when you only want the table.Reasoning vs toolcall model: Reasoning model drives chat and planning; toolcall model drives tool invocation when the provider exposes a separate slot (common on Anthropic/OpenAI).See LLM providers.
Browse registered tools with a short purpose beside each name. The list grows with your terminal height, showing up to 20 tools. A compact preview below the list shows the selected tool’s name and description.
In an interactive terminal, use ↑/↓ to browse and Enter to toggle chat/action surfaces, parameters, and the full description. Expanded details use the available height below the list. If they still overflow, ←/→ changes pages. Esc closes the browser and restores the conversation. Moving to another tool returns to its compact preview. Narrow terminals omit the purpose column; the selected tool’s description remains visible below the list.The browser uses a temporary terminal screen, so browsing and resizing do not add tool listings to your conversation’s scrollback.Piped and noninteractive output stays a readable table without keyboard input.There is no global /list command — use domain-specific list commands (see Natural language actions).

Privacy and history

Command history (up-arrow recall) is separate from session history (/sessions). Full redaction patterns and env vars: Interactive Shell Privacy.
Bare /history opens an interactive menu in a TTY (presets: 100, 500, 1000, 5000 for retention).
Redaction applies to the history file, not necessarily to what is sent to the LLM. Treat shared machines accordingly — run /history clear after sensitive sessions.
Shows persistence on/off, redaction on/off, retention cap, history file path, built-in pattern count, and a short threat-model reminder (unencrypted local disk).

Tasks and background

Long-running work is tracked in a per-session task registry surfaced by /tasks. Human todos and reminders are tracked separately by /work.
Control the background OpenSRE gateway daemon, which runs the web health app, Telegram chat, and the task scheduler. Scheduled work needs a scheduler running: this daemon, or opensre cron start in the foreground.
Logs are written to ~/.opensre/gateway/gateway.log. Same daemon as opensre gateway.
Example:
Shows up to 50 recent tasks, newest first. Use the id column (short prefix) with /cancel.
In an interactive terminal, /work add without a title asks for one, then shows selectable detail rows with Priority selected. Use arrow keys or Tab/Shift-Tab to move between rows, then Enter to edit a row or choose Create work item. Ctrl-S creates the item from the summary. Priority is a selection; project supports existing names or a new entry; due date supports Today, Tomorrow, or an ISO date/datetime. Optional fields remain unset unless supplied, and the existing Normal priority is shown explicitly. Esc returns from an edit without applying it; Esc on the summary cancels creation. Fully specified commands still execute directly./work add creates durable human todos; it does not schedule reminder delivery. For reminders, use the destination-aware opensre work add command with --remind-at and --target provider:chat-id, or ask from a connected chat whose destination OpenSRE can reuse. These work items are separate from /tasks (runtime jobs). See Work Management.You can also ask naturally:
  • Matches task id by prefix (must be unique among active/recent tasks)
  • Only running tasks accept cancellation
Prints guidance only — does not kill processes:

Agents and alerts

Fleet coordination is documented further on Agents. Register discovered agents with opensre fleet scan --register before /fleet trace targets them.
Kill confirmation: Without --force, prompts [y/N]. --force skips prompt (still elevated tier unless trust mode).
Reopen the selection menu the agent is waiting on. Useful when the menu scrolled away, or you dismissed it with Esc and want it back.
Prints No selection menu is pending. when the agent has not asked anything. Outside a TTY it lists the options as text for you to answer in a reply instead of opening a picker — except for a pending onboarding demo choice, which it drops with “Guided demo selection is unavailable here”, leaving you to ask for what you want directly.
When the alert listener is active:If the listener is inactive, prints a warning. Incoming alerts also appear in /status as incoming alerts. Post alerts to your configured webhook/listener URL during setup; the REPL triages them in chat.

Setup and ops (CLI parity)

These spawn opensre … subprocesses. Output is captured into the REPL buffer for non-interactive subcommands; wizards attach to the real TTY.
Sign in to a personal OpenSRE account, inspect the local login, show remaining hosted credits (/account credits or /credits, same as opensre credits), open the credits and top-up page (/account usage, opens your browser; from a chat it replies with the link), or sign out. Same as opensre account. The browser opens the OpenSRE sign-up page, where you can use email or any enabled sign-in provider. The shell starts only for an active account state. /logout (same as /account logout) revokes the saved session, invalidates the hosted-model route, and closes the shell before another turn. If OPENSRE_ACCOUNT_TOKEN is set in the environment, it overrides the token saved by login until you unset it.
Show remaining OpenSRE hosted credits for the signed-in account. Same as opensre credits and /account credits. Requires an active login. A fetch or auth failure is reported as unavailable — it is never shown as a zero balance.
Run the first-use webapp account flow. It creates or signs in to an OpenSRE account using email or another enabled provider and activates the account-hosted model. Use --dev for a webapp running at http://localhost:3000. Setup requires exclusive stdin because browser authorization prompts on the real TTY.
Log in to LLM providers, show local auth status, or clear stored credentials. Same as opensre auth. Interactive login prompts on the real TTY.
Shortcut for /auth login. Same provider flows as opensre auth login. This signs in an LLM provider. Sign in to an OpenSRE account with /account login, and sign out of that account with /logout.
Sign out of the OpenSRE account and close the shell. Same as /account logout: it revokes the saved session and drops the hosted-model route before another turn. It does not clear an LLM provider credential — use /auth logout <provider> for that.
Optional local LLM-provider onboarding. The account-hosted route remains authoritative while signed in, so this does not switch the model used by the interactive shell.
Operate remote deployed OpenSRE agents (EC2, Nitro, hosted runtime).
Copy sessions and memory to an object store you own (S3, GCS, Azure, Vercel Blob, or S3-compatible). Credentials and API keys stay local. See Sync to your own object store.
Read/write ~/.opensre/config.yml. Prefer env vars for secrets; use config for structured interactive-shell settings.
Scheduled report delivery. Press Enter or Tab after /cron to choose a subcommand. Choices needing task IDs or schedule options return to the composer for editing. /cron list displays all tasks with their IDs and timezone context; /cron logs <id> shows execution history. In the interactive shell, /cron run <id> waits up to five seconds before returning control while the task continues in the background; read its outcome with /cron logs <id>. /cron start runs the scheduler in the foreground until interrupted. See Cron.
List recurring loops from the scheduler store, create manual prompt loops, run a loop once immediately, stop or restart a loop, delete a loop, and debug the next fire time. By default a loop tick only produces a report; add --mode agent when the tick should act with tools (for example edit and push CI fixes). Onboarding creates draft examples such as a weekday morning report; active loops run through the cron scheduler when the gateway or opensre cron start is running.Agent-mode prompts must contain the complete task and name the tools to use; each tick starts a fresh session without loading workflow skills. For the CLI equivalent, use opensre cron add --kind manual_loop --mode agent with your prompt and schedule. Existing loops retain their stored mode; check /loops show <id> before reusing one.The list shows each loop’s latest finding and run status, plus its next scheduled time in your local timezone. Failed and quiet runs replace the previous result in the table.Use /loops show to pick a loop, or pass its name or ID directly. Details contain the full report, recent runs, and configuration. Open an earlier report with the run ID shown in its history. New reports are retained even when delivery fails; older reports may be unavailable.You can also ask naturally:
By default, new loops send to every configured default handle OpenSRE can reach: Telegram, Slack, and the local interactive-shell inbox.
Automated Sentry morning digest delivery (#10) and uptime watch notifications (#4032). Requires Sentry plus Telegram or Slack configured for the chosen provider. See Sentry.
Telegram bot pairing and sender allowlist for two-way chat and delivery features.
Related: Masking.
Checks PyPI and upgrades OpenSRE in-place (5-minute network timeout). Non-zero exit prints CLI error code.
Run or schedule automated PostHog per-metric summary reports. Requires the PostHog integration; see PostHog.
A scheduled report only fires while a scheduler is running, so pair it with /gateway start or opensre cron start. Same as opensre posthog.
Manage the trusted runbook sources the agent may read during guided investigations. See Runbook-guided investigations.
The agent reads runbooks only from sources listed here; an untrusted repository, an unsafe path, or a non-Markdown document is rejected. Same as opensre runbooks.
Targeted smoke tests (Sentry, etc.) — subcommands match opensre debug --help.
Removes OpenSRE and local data. Destructive — confirmation required unless trust mode. Delegates to interactive CLI uninstall flow.

System

Environment diagnostic distinct from /health:
Checks Python version, venv, config paths, Docker availability, credential presence, and related local prerequisites. Each row: ok, warn, or error with detail text.Use /doctor before first install debugging; use /health before an incident to verify integrations.
Choose the shell colour theme. The choice persists to interactive.theme in ~/.opensre/config.yml, so it survives restarts.
Bare /theme opens a picker with the current theme preselected, and needs a TTY. Passing a name sets it directly and reports an unknown name with the full list.Installed themes: green, blue, amber, mono, red, pink, purple, orange, teal, lime, nord, dracula, solarized, gruvbox, webflux, sunset. The default is purple.
Clean shutdown with a /resume hint. Prefer this over killing the terminal so session files flush cleanly./exit, /quit, double Ctrl+C, or Ctrl+D (empty prompt) all print something like:

Trust mode, /auto, and confirmations

Two controls decide whether the REPL prompts before an action: Non-TTY: actions that would ask fail closed (error message, no side effect).

Natural language actions

You do not need to memorize every slash command. Examples: List intents — there is no global /list: When the planner is uncertain, it asks for clarification or falls back to help — it does not silently run elevated commands. Compound requests (“health then integrations”) execute as an ordered sequence of slash actions.

Common workflows

First-time setup

Run opensre to sign in before this workflow is reachable. Every launch opens the demo picker; choose E or press Escape to continue to the prompt, or run opensre --skip-onboarding to bypass it. The recommended option analyzes CI/CD performance; see CI/CD analytics demo.

Incident triage (local)

Paste alert text or describe the incident in plain language and the agent will triage it with your connected integrations.

Pick up yesterday’s thread

Continue chatting, then optionally:

Inspect account and model state

Debug integration failures


Troubleshooting


Open the demo picker that every launch shows: CI/CD analysis of a repository on this machine (recommended), the recurring CI/CD reliability agent, remote CI/CD repairs, or Slack setup. Menus need an interactive terminal.
See CI/CD with OpenSRE.

Scheduled CI repair demo

Choose scheduled CI repair from /demo to try a tiny failure in a new private repository named opensre-ci-repair-demo- plus four letters or digits. OpenSRE creates it with a passing main, opens a pull request whose test fails, and schedules the repair of that pull request. A repository you name that is not an OpenSRE demo is left unchanged, and a new demo name is used instead. The repair has a ten-minute total limit. It uses the macOS or Linux background scheduler so it can finish after you close the terminal. Configure GitHub and authenticate your coding agent before starting. Creating the demo needs permission to create a private repository and workflow.
  • Read the complete outcome and evidence links with /loops show <task-id>.
  • Stop an active repair with /loops stop <task-id>.
  • The demo saves its evidence under ~/.opensre/demo-results/. The repository, its pull request, and the stopped loop history remain; delete the repository on GitHub when you no longer need it.