Skip to main content
The ouroborai CLI provides both single-command execution and an interactive REPL mode for conversing with the agent directly from your terminal. It communicates with the same Hono API server used by all other clients.

Commands

Examples

Interactive REPL

The chat command starts a persistent REPL session with multi-turn thread context. Each prompt in the session is sent with the same threadId, allowing the agent to reference previous messages:
Thread context is maintained for the duration of the REPL session. Exiting with exit, quit, or Ctrl+C ends the session and discards the thread reference.

Authentication

The CLI supports API key authentication via a flag or environment variable: The API key is sent as a Bearer token in the Authorization header.

Global Flags

Global flags can appear before the command and are parsed before dispatch.

Environment Variables

Flags take precedence over environment variables.

API Communication

All commands follow the same request lifecycle:
POST /agent/prompt with a JSON body containing the prompt text and an optional threadId (REPL mode only). Returns a jobId.
GET /agent/job/{jobId} polled every 2 seconds until the job reaches a terminal state (complete, failed, or cancelled). Timeout is 120 seconds.
Completed jobs display the result.text field. Failed jobs display the error message. In REPL mode, a spinner animates during both the submission and polling phases.

Setup

The CLI entry point is a Bun script:
To use it as a global arb command, link the binary:
Or set environment variables:

Terminal Output

The CLI uses ANSI color codes for readable terminal output: A box-drawing utility formats structured output with borders and headers. The REPL spinner cycles through braille animation frames during async operations.
The chat command is the most powerful mode — it preserves conversation context across turns, so you can issue follow-up instructions like “close half that position” without repeating context.