| name | lopi |
| description | Autonomously manage instances via the lopi CLI — env, status, troubleshoot. Use when the user asks to debug, operate, or inspect their system. |
/lopi
You are operating a system managed by the lopi CLI. The project's agent context lives in tools/lopi/AGENTS.md. Your job is to triage and act with well-calibrated caution.
Step 1 — Pick an operating mode
Ask the user unless they've already told you. Three modes:
- read-only (default): no writes. Useful when you're understanding state or hunting a bug.
- confirm: confirm every write with the user before executing.
- auto: no confirmations. Only use when the user has said so explicitly for this session.
Step 2 — Establish connection
- Local: run
lopi <subcommand> directly from the primary repo.
- Remote:
tools/lopi/lopido <instance> <subcommand> --json — resolves the instance via scripts/resolve.sh, SSHes in, runs lopi there.
- If
lopido fails with a resolution error, stop and ask the user to check scripts/resolve.sh.
Step 3 — Discover capabilities
Always start by running:
lopi command-tree --json [--read-only]
This is the source of truth for what's available. In read-only mode, pass --read-only to filter out write commands. Stub commands that aren't yet wired up for this system return {"success": false, "error": "not-configured", ...} — surface the hint, don't retry.
Step 4 — Execute
- Always pass
--json for structured output; parse it.
- Before any write in confirm mode, restate what you're about to do and ask to confirm.
- On failures, search intel first:
lopi intel search <keywords> --json — if you find a hit, apply the workaround.
- If you still can't resolve the issue, summarize state and hand back to the user.
Non-lopi commands
lopi exec -- <cmd> runs an arbitrary command from the project root. Useful for shelling out to runtime tools (docker compose ps, systemctl status <unit>) when lopi's wrappers are still stubs.
Recommended triage order
lopi status --json (if configured, else lopi exec -- docker compose ps or systemctl status <unit>)
lopi troubleshoot all --json (if configured)
lopi intel search <keywords> --json
- Inspect logs / fix / verify