CLI cookbook
Task-oriented recipes. Command syntax details live in the CLI reference.
Nightly maintenance across a fleet
Section titled “Nightly maintenance across a fleet”for repo in api web cli; do openloop task add -p "$repo" --title "Sweep flaky tests" --kind test --risk lowdoneopenloop service startOr schedule it once and let cron re-queue it weekly, add to .openloop/project.json:
{ "schedule": [{ "id": "flaky-sweep", "cron": "0 9 * * 1", "title": "Sweep flaky tests" }] }Work the review queue like an inbox
Section titled “Work the review queue like an inbox”openloop digest --since-hours 12 # what happened, what's waitingopenloop approval list -p api # human-review packetsopenloop promotion list -p api --status pendingApprove or reject in bulk:
openloop promotion apply -p api --task add-rate-limit-headers --note "checked"openloop promotion reject -p api --task migrate-auth-lib --note "needs design first"Keep autonomy on a short leash
Section titled “Keep autonomy on a short leash”openloop config set budgets.dailyCostUsd 5 # small ceiling while evaluatingopenloop config set runtime.maxAttemptsPerTask 1openloop config set runtime.projectSelectionStrategy focusopenloop project activate apiThen loosen as trust grows. Pair it with a policy that starts conservative:
scope: denyGlobs: ["infra/**", ".github/**", "migrations/**"] highRiskAreas: ["src/auth/**"]Gate every auto-merge through a script
Section titled “Gate every auto-merge through a script”openloop config add-hook \ --type command \ --events promotion-auto-merge-queued \ --command 'node scripts/review-gate.mjs'scripts/review-gate.mjs reads the JSON payload from stdin and prints {"requireManualReview": true, "note": "…"} to downgrade the merge (see hooks).
Let issues drive the backlog
Section titled “Let issues drive the backlog”openloop issue set-source -p api --github myorg/myrepo --auto-syncopenloop issue sync -p apiLabel issues openloop in the tracker; the loop picks them up and comments progress back. Guide.
Hand the fleet to your editor agent
Section titled “Hand the fleet to your editor agent”Register the MCP server in your client, then ask things like “what’s in the openloop promotion queue?” or “pause openloop while I refactor auth”.
Answer “what did it do overnight?”
Section titled “Answer “what did it do overnight?””openloop report --hours 12 # narrative summaryopenloop events --since 12h --limit 200openloop logs -p api # per-run summaries from .openloop/runs/Try a change without committing to it
Section titled “Try a change without committing to it”openloop run-once -p api --dry-run # see task selection + promptopenloop run-once -p api # one real iteration, no daemonopenloop promotion show -p api --task <task>run-once never starts the daemon: it’s the same pipeline, one iteration, on demand.
Move a repo to worktree isolation
Section titled “Move a repo to worktree isolation”# in .openloop/project.json{ "runtime": { "useWorktree": true, "branchPrefix": "openloop/" } }From then on runs happen in .openloop/worktrees/ on openloop/<taskId> branches; your checkout stays clean. (Existing tasks continue fine, only new runs change behavior.)