You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Investigation and chat should both be usable from the terminal without curl-ing the HTTP API. This issue is the CLI mirror of the chat and Deep-Research endpoints, and supersedes the older single-command framing in #29.
Scope (in)
repi ask "<query>"
Calls POST /chat. Streams tokens to stdout. Flags:
--service <name> — pre-fills filters.service
--since <natural-language> — pre-fills filters.time_from (parsed via the time helpers in repi/intent/resolver.py, or passed as-is appended to the query)
--conversation <id> — continues an existing conversation; otherwise starts a new one and prints the id at the end
repi investigate "<query>"
Calls POST /investigate (creates the investigation) then opens GET /investigations/{id}/stream (SSE).
Prints each step as it arrives: thought block (wrapped) + action (tool name + args, one line) + observation (truncated to ~200 chars).
Final answer printed at the end, then exits.
Same --service, --since, --until, --conversation flags as ask.
repi sessions list
Wraps GET /conversations (or GET /investigations until conversations land). Prints id, created_at, mode (chat / investigate / mixed), first line of the query.
repi sessions show <id>
Wraps GET /conversations/{id} (or GET /investigations/{id} fallback). Re-renders the transcript: alternating user / assistant turns with mode markers.
General
All commands respect REPI_API_URL (default http://localhost:8000).
Clear error if the server isn't reachable: "Could not reach repi server at . Is repi serve running?".
Why
Investigation and chat should both be usable from the terminal without curl-ing the HTTP API. This issue is the CLI mirror of the chat and Deep-Research endpoints, and supersedes the older single-command framing in #29.
Scope (in)
repi ask "<query>"Calls
POST /chat. Streams tokens to stdout. Flags:--service <name>— pre-fillsfilters.service--since <natural-language>— pre-fillsfilters.time_from(parsed via the time helpers inrepi/intent/resolver.py, or passed as-is appended to the query)--until <natural-language>— pre-fillsfilters.time_to--conversation <id>— continues an existing conversation; otherwise starts a new one and prints the id at the endrepi investigate "<query>"Calls
POST /investigate(creates the investigation) then opensGET /investigations/{id}/stream(SSE).thoughtblock (wrapped) +action(tool name + args, one line) +observation(truncated to ~200 chars).--service,--since,--until,--conversationflags asask.repi sessions listWraps
GET /conversations(orGET /investigationsuntil conversations land). Printsid,created_at,mode(chat / investigate / mixed), first line of the query.repi sessions show <id>Wraps
GET /conversations/{id}(orGET /investigations/{id}fallback). Re-renders the transcript: alternating user / assistant turns with mode markers.General
REPI_API_URL(defaulthttp://localhost:8000).repi serverunning?".Scope (out)
repi watch(originally in D9: CLI-first investigation UX —repi investigate,repi sessions,repi watch#29) — out of scope here; tracked separately if there is demand.Acceptance
repi servein one terminal,repi ask "errors in cart-svc"in another prints a streamed answer.repi investigate "..."streams steps and prints a final answer.repi sessions listshows recent conversations;repi sessions show <id>re-renders the transcript.repi investigate,repi sessions,repi watch#29 closed with a comment linking this issue.Files
repi/cli.pyDepends on
The chat API and the conversations API.
Closes
#29