Shell commands
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.
Info
Confirmation prompts come from /auto (tool-approval autonomy) and from
elevated slash commands. Default /auto is high (alpha: no tool prompts),
except Python execution, which asks before every call at every level. Pick
Yes, allow for this session to stop those prompts until /new or
/resume; code that asks for network access still prompts each time.
/trust on skips all approval prompts for the rest of the session. Outside a
TTY, actions that would ask are blocked.
How the REPL works¶
| Input type | What happens |
|---|---|
Slash command (/status) |
Routed through the action agent and executed via slash_invoke |
Plain language (verify datadog) |
Routed by the action agent to slash commands, tool calls, or doc-grounded answers |
| Pasted alert JSON/text | The agent triages it in chat, calling integration tools as needed |
Shell one-liner (kubectl get pods) |
Executed through shell policy when the action agent selects a shell action |
Shell command syntax¶
shell_run uses the command shell of the environment where OpenSRE is running:
- Native Windows uses
cmd.exe. Usecmdoperators (&,&&, and|),%NAME%environment variables, and caret escaping (^). PowerShell syntax is not translated; invokepowershell -NoProfile -Command "..."orpwsh -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.
Reading files¶
The agent reads, searches and lists files in OpenSRE's working directory with
read-only tools (read_file, search_files, list_files) rather than shell
commands, so these steps never ask for approval. Start OpenSRE in the
repository you want it to read. These tools:
- stay inside the working directory; anything elsewhere on the machine goes
through
shell_runand its approval; - cover the files git tracks plus the ones it does not ignore, so build output and virtual environments are neither listed nor searched;
- refuse files that usually hold credentials (
.envand.env.*, private keys, Terraform state and variables, and the.git,.ssh,.aws,.azure,.gnupg,.kubeand.dockerdirectories) and redact known token formats from what they return. Placeholders such as.env.examplestay readable.
Python execution¶
Python the agent writes runs in a restricted subprocess, after you approve it:
- only the standard library is available. Packages that load native code, such as numpy and pandas, cannot be imported, and nothing can be installed;
- it cannot start other programs, and it reaches the network only when the code asks for it and you approve that call;
- it runs for 30 seconds by default and 60 at most.
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:
| Key | Effect |
|---|---|
| Up/Down | Browse suggestions while the command tray is open; otherwise recall persisted command history (when enabled) |
| Tab | Complete the highlighted suggestion; for commands with subcommands, open their tray |
| Enter | Open the highlighted command's subcommand tray, or run a final selection |
| Esc | Close the command tray first; otherwise stop running work or clear the draft |
| Ctrl+C once | Cancel in-flight streaming work or interrupt the current prompt |
| Ctrl+C twice within 2s | Exit the REPL (prints /resume hint) |
| Ctrl+D | Exit when the prompt is empty and nothing is running (same resume hint as /exit) |
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¶
| Command | What it does |
|---|---|
/help |
List commands or show help for one command or category |
/? |
Shortcut for /help |
/exit |
Leave the interactive shell |
/quit |
Alias for /exit |
/demo |
Open the guided demo picker (CI/CD analysis, reliability agent, managed service, Slack) |
Session¶
| Command | What it does |
|---|---|
/status |
Session summary — interactions, alerts, provider, effort, trust mode |
/cost |
Token usage and LLM call count for the current session |
/context |
What the next model call will contain, and how big each part is |
/effort |
Set or show reasoning effort (low … max) |
/auto |
Tool-approval autonomy (off / low / med / high; default high) |
/trust |
Enable or disable trust mode (skip confirmation prompts) |
/verbose |
Toggle verbose logging |
/clear |
Clear the screen and re-render the banner |
/compact |
Summarize older context into a replayable compaction entry |
/sessions |
Browse recent sessions; select one with ↑/↓ and Enter in a terminal |
/resume <id> |
Restore a past session's conversation context |
/resume <id>:<entry> |
Restore a specific session branch point |
/new |
Start a new session file while keeping LLM context |
/rename <name> |
Rename the current session (/rename --reset clears the name) |
/goal |
Set a finish line and keep working toward it across turns — see Goals |
Integrations, models, and tools¶
| Command | What it does |
|---|---|
/health |
Integration and agent health check |
/verify |
Verify integration connectivity (all or one service) |
/integrations |
List, verify, show, setup, or remove integrations |
/mcp |
List, connect, remove, or disconnect MCP servers |
/model |
Select a model from saved provider connections |
/tools |
List registered chat and action tools |
Privacy and history¶
| Command | What it does |
|---|---|
/history |
Show or manage persisted command history |
/privacy |
History persistence, redaction status, and threat model |
/memory |
List and manage the agent's long-term memory |
/knowledge |
Show workspace knowledge and check memory health (show <name>, audit, scan [service]) |
Tasks and background work¶
| Command | What it does |
|---|---|
/loops |
List, create, run once, and debug recurring prompt loops |
/tasks |
List recent and in-flight background tasks |
/work |
List, add, complete, and prioritize human work items |
/cancel <id> |
Cancel a running task by id elevated |
/stop |
Guidance for stopping background work |
/gateway |
Start, stop, or inspect the background gateway daemon |
Alerts and selections¶
| Command | What it does |
|---|---|
/alerts |
Alert listener inbox status |
/choose |
Reopen the selection menu the agent is waiting on |
CLI parity¶
These commands delegate to the same Click CLI you would run outside the REPL.
| Command | What it does |
|---|---|
/account |
Sign in to OpenSRE, inspect the local account, or sign out |
/credits |
Remaining hosted credits for the signed-in account (same as opensre credits) |
/setup |
First-run setup: account sign-in, hosted model, then the shell (same as opensre setup) |
/login |
Manage model connections: list, connect, verify, or disconnect. Direct /login <provider> connects that provider |
/account logout |
Sign out of OpenSRE and close the shell; keeps external provider connections |
/onboard |
Interactive onboarding wizard |
/remote |
Connect to and operate remote deployed agents |
/remote-sync |
Manage remote sync to your object store. Subcommands: status, sync, setup. See Sync to your own object store. |
/config |
Show or edit ~/.opensre/config.yml |
/cron |
Manage scheduled delivery jobs |
/sentry |
Schedule automated Sentry morning digests or uptime watches (Telegram or Slack required) |
/messaging |
Telegram pairing and allowlist |
/guardrails |
Sensitive-information guardrail rules |
/update |
Check for updates and upgrade OpenSRE |
/posthog |
Run or schedule PostHog per-metric summary reports |
/runbooks |
Manage trusted runbook sources for guided investigations |
/skills |
Publish skills and inspect the live skills release (status, update, push <name>, rollback) |
/debug |
Targeted runtime diagnostics |
/uninstall |
Remove OpenSRE and local data elevated |
System¶
| Command | What it does |
|---|---|
/doctor |
Full local environment diagnostic |
/version |
OpenSRE, Python, and OS versions |
/theme |
Choose and persist the shell colour theme |
Commands with interactive menus (TTY)¶
These invocations open a picker or submenu:
| Command | Menu behavior |
|---|---|
/help |
Browse categories; Enter runs the selected command |
/integrations list |
Browse configured integrations; verify, setup, or remove the selected item |
/mcp list |
Browse configured MCP servers; verify, connect, or disconnect |
/model |
Flat model picker; Enter selects, Esc keeps the active model |
/theme |
Pick a colour theme from the installed list |
/choose |
Reopen the selection menu the agent queued |
/trust, /verbose |
on / off |
/history |
show / clear / off / on / retention |
/resume |
Arrow-key picker of recent conversations |
/integrations list and /mcp list use the same searchable list as /loops list.
Type to filter; click a row or use ↑↓/Tab to see its details below the list.
New connections show Checking… while connectivity checks run in the background;
results appear without pressing Enter. Search and navigation stay available while checks run.
The list remembers this session’s last check result with a Last checked timestamp,
including when you reopen it or switch between the two lists. Enter runs a fresh
check and updates the result in place. Use F2 for setup, F3 to
remove/disconnect (with confirmation), F4 to add/connect, and Esc to close.
Checks time out after 30 seconds; Esc cancels an in-progress check.
These action keys leave ordinary typing available for search. Connections without
a verifier show Configured, not a successful connectivity check.
/model and bare /model set show saved connections without checking every
installed CLI or opening a sign-in flow. /model list prints the same inventory.
To add or reconnect a provider, use /login; installing a CLI or setting only a
model preference does not add a connection. Saved connections with unknown auth
show Auth checked on use, not a successful live check.
Commands¶
Help¶
/help
| Form | Result |
|---|---|
/help |
Interactive picker in a TTY; category index otherwise |
/help <command> |
Detailed usage for one command (e.g. /help /model) |
/help <category> |
All commands in a section (session, tasks, …) |
/help all |
Full command index |
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¶
/status
Shows a snapshot of the current REPL session:
Typical fields:
| Field | Meaning |
|---|---|
interactions |
Count of recorded turns (chat, slash, alerts) |
incoming alerts |
Alerts received by the local listener this session, plus age of the latest |
trust mode |
on / off |
reasoning effort |
Current /effort level (OpenAI/Codex only) |
provider |
Active LLM_PROVIDER |
accumulated context |
Comma-separated keys from prior turns (e.g. service, cluster) |
Use /status for session state. Use /health for integration connectivity.
/cost
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):
Session cost (includes estimates)
history entries 12
llm calls 8
input tokens 4,210 (measured: 1,200 · estimated: 3,010)
output tokens 890 (estimated: 890)
| Field | Meaning |
|---|---|
history entries |
Lines recorded in this session's in-memory history |
llm calls |
LLM turns counted (planner + chat + help + follow-up) |
input tokens / output tokens |
Running totals for prompt and completion usage |
Measured vs estimated:
| Code path | Token source |
|---|---|
Planner invoke() (action selection) |
Provider usage metadata when the API returns it |
| Streaming chat, help, follow-up | Estimated from character length (~4 characters per token) |
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.
/context
Shows what the model will receive with your next message, without calling a model:
| Row | Meaning |
|---|---|
| one row per prompt block | The system prompt, rules, runtime facts, skills, connected integrations, memory, and the per-turn blocks, each with its tier, characters, and estimated tokens |
history |
Earlier turns replayed to the model, including their tool calls and results. Shown as history after compaction when the next turn compacts first: only the turns compaction keeps, without the summary it writes then |
total |
Blocks plus history; the message you type next and the tool schemas are not included |
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.
/effort
Set reasoning depth for OpenAI and Codex providers in this REPL session only.
| Level | When to use |
|---|---|
low |
Fast triage, simple lookups, lower token cost |
medium |
Default balance for most incident work |
high |
Deeper analysis when latency is acceptable |
xhigh, max |
Maximum reasoning; best with newer GPT-5 or Codex models — older models may reject these levels |
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.
/auto
Set how often the REPL asks before running agent tools. Shown on the status line as Auto (Med) · ….
| Level | Prompts before |
|---|---|
high (default) |
Nothing except Python execution — alpha default; every other tool runs immediately |
med |
Mutating agent tools: shell, code agent, slash/CLI, synthetic tests, LLM provider switch, Sentry issue fix, …; and tools that act on an outside system: sending Slack, Telegram, Rocket.Chat, Buzz, or SMS messages, creating Jira issues or comments, creating Google Docs, prompting a hosted gateway, and calling tools on connected MCP servers (Pipedream, Sentry MCP, PostHog MCP) |
low |
Everything med asks about, plus additional tool starts |
off |
Every tool type |
/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, or by the tool's declared side effect for tools that act on an outside system. Read-only tools such as log, metric, and listing tools never prompt.
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
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.
/verbose
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.
/clear
Clears the terminal and re-renders the OpenSRE banner. Does not reset session state, token usage, LLM conversation context, or accumulated infra context.
/compact
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.
/sessions
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.
/resume
Restore LLM conversation context and accumulated infra context from a previous session.
| Form | Behavior |
|---|---|
| ID prefix | Match session UUID by prefix (must be unique) |
| ID + entry prefix | Replay the branch ending at the matching entry ID prefix |
| Name substring | Match when ≥3 characters and exactly one session matches (e.g. /resume redis) |
Bare /resume |
Arrow-key picker of recent conversations (TTY) |
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:
- Switches the active session file to the target session
- Restores
cli_agent_messagesso the assistant remembers prior turns - Restores
accumulated_contextkeys - 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:
/resume |
|
|---|---|
| Conversation context | Yes |
| Infra context keys | Yes |
| Trust mode, reasoning effort | No — per-session preferences |
Token usage / /cost counters |
No — fresh counters for the resumed session identity |
| In-memory history count | Yes — turn stubs from the saved session |
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.
/new
Rotate to a new session file while keeping the current LLM conversation thread and accumulated context.
new session started — conversation context carried forward.
14 messages in context · type to continue
| Command | Session file | LLM context | Token counters |
|---|---|---|---|
/clear |
Same | Kept | Kept |
/new |
New UUID | Kept | Reset |
/resume |
Target session | Replaced with target | Reset for that session |
Use /new after a long /resume so /sessions stays tidy without losing your place in the conversation.
/goal
Set a finish line and keep working toward it across turns:
/goal
/goal set How many Windows users signed up last week?
/goal set --max-turns 4 Prefer live PostHog if connected
/goal pause
/goal resume
/goal edit
/goal edit <updated condition>
/goal clear
Bare /goal shows the current goal. /goal set starts work immediately.
In an interactive terminal, /goal set without a condition asks for one, then
shows the turn budget for review. The condition is required; max turns is
optional and empty leaves the goal unbounded. Use arrow keys or Tab/Shift-Tab
to move between rows, then Enter to edit a row or choose Set goal. Ctrl-S
attaches the goal from the summary and runs the condition as the next turn.
Esc returns from an edit without applying it; Esc on the summary cancels
without attaching anything. Fully specified commands still execute directly.
See Goals for the full workflow.
Bare /goal edit reviews the current condition in the same form. Choose Save changes
to apply it. The existing turn budget and progress stay attached; an active goal
continues with the updated condition, while a paused goal stays paused.
Integrations, models, and tools¶
Choosing the right diagnostic command
| Question | Command |
|---|---|
| Are my integrations configured and reachable? | /verify, /health, or /integrations verify |
| Verify one integration by name? | /verify datadog or /integrations verify datadog |
| Show one integration's credentials/endpoints? | /integrations show datadog |
| Is Python/Docker/venv OK on this machine? | /doctor |
| What integrations exist in OpenSRE generally? | Ask in plain language (docs answer) — not /integrations list |
/health
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.
/verify
Shortcut for integration connectivity checks (same as opensre integrations verify / make verify-integrations).
| Form | Behavior |
|---|---|
Bare /verify |
Verify all integrations; prints status table plus all integrations ok or N integration(s) need attention |
/verify <service> |
Verify one named integration |
/integrations
/integrations list
/integrations verify
/integrations verify datadog
/integrations show datadog
/integrations setup datadog
/integrations setup telegram
/integrations remove datadog
| Subcommand | Behavior |
|---|---|
list |
Browse configured integrations in a TTY; verify and render a status table otherwise |
verify |
Verify all integrations; prints summary line |
verify <service> |
Verify one integration (same as /verify <service>) |
show <service> |
Verify one service and print key/value config (masked secrets) |
setup <service> |
Guided setup with sign-in instructions, discovery, and verification |
remove <service> |
Remove from local store elevated |
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 searchable configured-integration browser in a TTY. Click a row or use ↑↓/Tab to see its details; Enter runs a fresh connectivity check when supported. Use F2 for setup, F3 to remove with confirmation, F4 to add, and Esc to close. Verification updates the list in place; setup and removal return to the conversation.
Connections without a result are checked automatically in the background, up to three at a time. Last-known results and their Last checked timestamps are remembered for this REPL session only; reopening reuses them until you press Enter to recheck. Connections without a verifier show Configured, not a successful health check; setup and removal remain available. Use /integrations verify to check all connections again.
/mcp
MCP servers you added with /mcp connect, plus the GitHub, Sentry MCP, and PostHog MCP integrations.
/mcp list opens the same searchable browser and automatically checks connections without a result in the background. It shows Checking… until results arrive, or this session’s last check result with its timestamp. Click a row or use ↑↓/Tab to browse, Enter to check again, F2 to reconfigure, F3 to disconnect with confirmation, F4 to connect, and Esc to close. Explicit subcommands remain available below.
| Subcommand | Maps to |
|---|---|
list |
Browse configured MCP servers in a TTY; otherwise a verified table with one row per added server (name, transport, endpoint, read-only, status; no credentials) |
connect |
opensre integrations setup mcp — add any MCP server (see MCP servers) |
connect <service> |
opensre integrations setup <service> |
remove <name> |
opensre integrations remove mcp <name> — remove one added MCP server, with confirmation; other servers are kept |
disconnect <service> |
opensre integrations remove <service> — remove a whole integration, such as github |
/model
Choose a model directly from your connected providers. The searchable picker shows each model's provider and billing source, marks the current selection, and activates a row with one Enter. Esc/Ctrl-C leaves your active model unchanged. The same model name on API and subscription routes stays a separate choice.
/model
/model list
/model show
/model set openai gpt-5.4-mini
/model set anthropic claude-sonnet-4-6 --toolcall-model claude-haiku-4-5
/model set claude-sonnet-4-6
/model restore
/model toolcall set gpt-5.4-mini
| Subcommand | Behavior |
|---|---|
/model or set without arguments |
Open the direct model picker in a terminal that owns stdin |
list |
List connected model choices, sources and availability without switching |
show |
Show the effective provider and reasoning/toolcall slots without switching |
set <provider> [model] [--toolcall-model <m>] |
Select an already-connected source; missing credentials explain how to log in |
set <model> |
Update the current local provider's reasoning model |
restore [provider] |
Restore the selected source's provider default; custom gateways keep their configured model |
toolcall set <model> |
Set the current local provider's tool-call slot |
Use + Connect a provider inside the picker, or /login. Successful login
opens that provider's model choices automatically. Choose later keeps your
connection without changing the active model. API and CLI catalogs are quick
choices, not a guarantee of entitlement; subscription/local catalogs come from
the connected account/host. Run /login verify <provider> to inspect credentials
or /login <provider> to reconnect and refresh discovered choices.
Selecting a local provider explicitly changes inference billing while keeping
your OpenSRE account signed in. Choose OpenSRE hosted in /model (or
/model set opensre-hosted) to return to hosted credits. Model-only changes and
tool-call overrides do not implicitly leave hosted billing. General Claude Code
choices are labelled CLI-managed, not subscription-only.
Non-TTY and agent-invoked bare /model show settings without opening a picker.
Standalone equivalents are opensre model, opensre model list/show/set/restore
and opensre model toolcall set/show. opensre --json model list and
opensre --json model show provide full identifiers and source labels.
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.
/tools
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.
/history
| Subcommand | Behavior |
|---|---|
| (none) | Numbered list of persisted prompt lines |
clear |
Delete ~/.opensre/interactive_history; up-arrow recall empty on next launch |
off |
Pause disk writes for this session (in-memory recall still works) |
on |
Resume persistence |
retention <N> |
Cap file entries; prunes immediately (requires redacting backend) |
Bare /history opens an interactive menu in a TTY (presets: 100, 500, 1000, 5000 for retention).
Warning
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.
/privacy
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.
Task kinds
| Kind | Source |
|---|---|
cli_command |
Delegated CLI subprocesses |
code_agent |
Code-agent integrations (when used) |
Task statuses
| Status | Meaning |
|---|---|
running |
In progress; /cancel eligible |
completed |
Finished successfully |
cancelled |
User or /cancel stopped it |
failed |
Non-zero exit or pipeline error |
pending |
Created but not yet started |
/gateway
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.
| Subcommand | Behavior |
|---|---|
status (default) |
Running state and pid, plus a line per component |
start |
Start the daemon in the background |
stop |
Stop the running daemon |
logs [lines] |
Tail the log, 30 lines by default |
Logs are written to ~/.opensre/gateway/gateway.log. Same daemon as opensre gateway.
/tasks
Example:
Tasks
id kind status started (UTC) duration detail
def34 cli_command completed 2026-06-17 09:55 120.0s opensre health
Shows up to 50 recent tasks, newest first. Use the id column (short prefix) with /cancel.
/work
/work
/work add <title>
/work edit
/work edit <id-or-title> --priority high --due 2026-10-20
/work done <id-or-title>
/work next
/work path
Interactive record lists (/work list, /work next, /loops list, /cron list,
/memory list, and /tasks, including their list aliases) share read-only search.
Type a name, ID, or displayed detail to filter; use arrow keys or Tab to move
through matches. Enter never changes a record. Esc closes search and leaves the
full listing in your terminal. Command filters still apply. CLI, piped, and
agent-requested listings remain plain output; logs and reports are unchanged.
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.
Use /work done or /work complete without a target to choose an unfinished work
item in an interactive terminal. Type to search, use arrow keys to choose, and
Enter to mark it complete. You can still pass one or more IDs directly. Outside
the interactive terminal, a completion target is required.
Use /work edit to choose an existing item, or /work edit <id-or-title> to open
its prefilled title, priority, project, owner, and due date. Choose Save changes
after reviewing. An explicit field command executes directly; use a quoted empty
value such as --owner "" or --due "" to clear an optional field.
Missing-target edit options such as /work edit --priority high are kept for
review after you choose an item.
/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:
/cancel
- Matches task id by prefix (must be unique among active/recent tasks)
- Only running tasks accept cancellation
/stop
Prints guidance only — does not kill processes:
| Situation | Action |
|---|---|
| Streaming turn | Ctrl+C |
| Background CLI task | /tasks → /cancel <id> |
Alerts and selections¶
/choose
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.
/alerts
When the alert listener is active:
| Field | Meaning |
|---|---|
status |
listening |
queue depth |
Alerts waiting for REPL consumption |
dropped |
Alerts dropped when queue was full |
recent |
Up to 5 latest alert names/snippets |
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.
/account
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.
/credits
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.
/setup
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.
/login — model connections
/login
/login list
/login status openai
/login connect
/login openai
/login verify openai
/login disconnect openai
Bare /login opens the standard action tray: list, connect, verify,
and disconnect. List shows connection status without retrieving stored secrets
or contacting providers. Verify explicitly checks the selected connection. When
verify or disconnect needs a provider, the terminal offers saved connections;
Esc cancels without changing settings. Non-interactive commands require an
explicit action and any required provider; they never wait for a picker.
Connect opens Subscription, API key, CLI-managed, or Local / cloud,
then the provider submenu. Esc from providers goes back to methods. Direct
/login openai or /login connect openai skips those choices. The same commands
work outside the shell as opensre login ….
After connection, a model picker opens. Choose later or Esc keeps the
connection and the current model/billing source. --no-set-provider connects
only; --set-provider --model <id> explicitly connects and activates without the
picker. /model selects among existing connections, including OpenSRE hosted.
Disconnect removes only the credentials OpenSRE manages for that provider.
For CLI-managed or ambient-cloud connections, it clears OpenSRE metadata while
leaving the vendor session, ambient credentials, and host settings intact. It
does not change the selected model or silently fall back to hosted billing;
select another connection explicitly with /model if needed.
OpenSRE hosted inference uses your OpenSRE account and credits, independently
of external provider connections. Use /account login, /account credits,
and /account logout for that account. Account logout closes the shell and
preserves external provider connections.
Compatibility commands and migration
Existing /auth, /auth status [provider], /auth login <provider>,
/auth verify <provider>, and /auth logout <provider> remain supported with
their existing meanings. The equivalent opensre auth … commands continue to
work in scripts. Use /login list, /login <provider>, /login verify <provider>,
and /login disconnect <provider> for new workflows.
/logout remains a shortcut for /account logout; it never disconnects a model
provider. These compatibility commands are omitted from primary help and root
completion suggestions, but can still be typed and inspected with /help /auth
or /help /logout. No removal is scheduled in this change. Any future removal
must announce a migration window in the release notes; scripts retain their
current arguments and exit behavior during that window.
/setup remains the first-run account flow. /onboard and
/onboard local_llm retain their existing provider/local-model setup capabilities;
they have not been replaced with aliases for /setup.
/onboard
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.
/remote
Operate remote deployed OpenSRE agents (EC2, Nitro, hosted runtime).
/remote-sync
/remote-sync
/remote-sync status
/remote-sync sync
/remote-sync sync --dry-run
/remote-sync setup --provider aws --bucket my-opensre-bucket
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.
/config
Read/write ~/.opensre/config.yml. Prefer env vars for secrets; use config for structured interactive-shell settings.
/cron
/cron
/cron list
/cron status
/cron start [--service]
/cron add
/cron remove <id>
/cron run <id>
/cron logs <id>
Scheduled report delivery. Press Enter or Tab after /cron to choose a subcommand. When /cron add is missing required values, the form opens the first missing input and preserves supplied options. Review the task, schedule and delivery in compact rows; use More options for settings such as timezone, name and lookback. Required values and defaults appear while editing. Choose Create schedule or press Ctrl-S from the main review to save. Esc returns from an editor or More options; from the main review it cancels without saving. Creating a schedule does not run it immediately. Complete commands and non-interactive calls keep their usual behavior. Choices needing task IDs still 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.
/loops
/loops
/loops active
/loops all
/loops show
/loops show <name-or-id>
/loops show <name-or-id> --run <run-id>
/loops add --name "Morning ops" --time 08:30 --prompt "Check open incidents and summarize production risk" --run-now
/loops add --name "CI fix agent" --cron "*/30 * * * * *" --mode agent --prompt "Repair failing PR checks with fix_github_pr_ci"
/loops edit
/loops edit <name-or-id> --time 09:30 --weekdays
/loops run <loop_id>
/loops stop <loop_id>
/loops start <loop_id>
/loops delete <loop_id>
/loops next <loop_id>
/loops messages
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.
In an interactive terminal, omit the ID from /loops run, /loops start,
/loops stop, /loops delete, or /loops next to choose a loop from a searchable
list. Start offers stopped and draft loops; stop offers active loops. Running a
loop requires the Run now action after reviewing its configuration. Deleting
requires Delete permanently confirmation. Esc cancels selection; Esc during
action review returns to the list. Outside the interactive terminal, supply an ID.
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.
Use /loops edit to pick a recurring loop, or pass its name or ID to review the
current settings. Edit its name and schedule, with timezone and lookback under
More options. Ordinary prompt loops also expose their prompt and Report/Agent
mode; managed instructions remain tied to their template, report, or skill.
Choose Save changes to update the existing loop. Editing does not run it,
change its delivery destinations, or enable a stopped loop. Complete commands
with explicit edit options also work without an interactive terminal.
If you omit the target but supply options, such as /loops edit --time 09:30,
those values are kept for review after you choose a loop.
You can also ask naturally:
Set up a manual loop called Morning ops at 08:30 UTC to check open incidents and summarize production risk, and run it once now.
By default, new loops send to every configured default handle OpenSRE can reach: Telegram, Slack, and the local interactive-shell inbox.
/sentry
/sentry digest run
/sentry digest schedule list
/sentry digest schedule add --cron "0 8 * * *" --provider telegram --chat-id <id>
/sentry digest schedule run <id>
/sentry digest schedule remove <id>
/sentry uptime check
/sentry uptime watch list
/sentry uptime watch add --cron "*/5 * * * *" --provider telegram --chat-id <id>
/sentry uptime watch run <id>
/sentry uptime watch remove <id>
Automated Sentry morning digest delivery (#10) and uptime watch notifications (#4032). Requires Sentry plus Telegram or Slack configured for the chosen provider. See Sentry.
/messaging
Telegram bot pairing and sender allowlist for two-way chat and delivery features.
/guardrails
| Subcommand | Purpose |
|---|---|
init |
Scaffold local guardrail config |
rules |
List active masking rules |
test |
Run sample text through rules |
audit |
Scan recent content for sensitive patterns |
Related: Masking.
/update
Checks PyPI and upgrades OpenSRE in-place (5-minute network timeout). Non-zero exit prints CLI error code.
/posthog
Run or schedule automated PostHog per-metric summary reports. Requires the PostHog integration; see PostHog.
/posthog report run
/posthog report schedule list
/posthog report schedule add
/posthog report schedule run <id>
/posthog report schedule remove <id>
A scheduled report only fires while a scheduler is running, so pair it with /gateway start or opensre cron start. Same as opensre posthog.
/runbooks
Manage the trusted runbook sources the agent may read during guided investigations. See Runbook-guided investigations.
/runbooks list
/runbooks add github --name <name> --repo <owner/repo>
/runbooks verify <name>
/runbooks remove <name>
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.
/uninstall
Removes OpenSRE and local data. Destructive — confirmation required unless trust mode. Delegates to interactive CLI uninstall flow.
System¶
/doctor
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.
/theme
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.
/version
| Field | Example |
|---|---|
opensre |
Package version from install |
python |
3.12.x |
os |
darwin (arm64) |
/exit and /quit
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:
| Control | Role |
|---|---|
/auto |
Which agent tool types need approval (default high = none) |
/trust |
Session override that skips approval prompts when /auto (or an elevated slash command) would ask |
| Tier | Examples | Confirmation |
|---|---|---|
| Exempt | /help, /exit, /trust, /auto |
Never prompts |
| Safe | /status, /health, /integrations list |
Read-only or standard risk |
| Elevated | /cancel, /integrations remove, /uninstall |
Prompt unless trust on |
Non-TTY: actions that would ask fail closed (error message, no side effect).
/auto med # ask before mutating agent tools
/auto high # alpha default — no tool prompts
/trust on # skip prompts for this session
/trust off # restore /auto (and elevated) prompts
Natural language actions¶
You do not need to memorize every slash command. Examples:
| You type | Typical action |
|---|---|
| "what's my token usage?" | /cost |
| "verify datadog" | /verify datadog |
| "show datadog config" | /integrations show datadog |
| "show the active model" | /model show |
| "list my past sessions" | /sessions |
| "check health then list integrations" | /health then /integrations list |
| "how do I configure Datadog?" | Doc-grounded answer (no mutating command) |
List intents — there is no global /list:
| Intent | Command |
|---|---|
| Connected integrations | /integrations list |
| Tools | /tools |
| Background tasks | /tasks |
| Human todos and reminders | /work |
| MCP servers | /mcp list |
| Cron jobs | /loops or /cron list |
| Past REPL sessions | /sessions |
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¶
| Symptom | Try |
|---|---|
unknown command |
/help; check spelling; use suggested correction |
| Elevated command blocked in CI | Use the CLI equivalent or run interactively |
/cost shows zero |
No LLM turns yet this session; chat once and retry |
/resume not found |
Run /sessions; use longer ID prefix |
/resume ambiguous prefix |
Add more characters from Session ID column |
| Model-only change reports hosted management | Use /model to explicitly select a connected local source; /logout is not needed to switch billing |
/integrations show not found |
Run /integrations list for exact service slug |
| History pause not working | Requires redacting backend — see /privacy |
| Garbage in next prompt after table | Known TTY issue — upgrade OpenSRE; report if persistent |
Related docs¶
- Goals —
/goalset, pause, resume, edit, clear - Session History — persistence format, privacy,
/newvs/clear - Interactive Shell Privacy — redaction, env vars, threat model
- LLM providers —
/modeland/effort - Cron —
/cronscheduled deliveries - Sync to your own object store —
/remote-sync
/demo
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.
Markdown source: View on AtomGit·Content from the open-source project op/opensre