Commands
Examples
Interactive REPL
Thechat 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:1. Submit prompt
1. Submit prompt
POST /agent/prompt with a JSON body containing the prompt text and an
optional threadId (REPL mode only). Returns a jobId.2. Poll for result
2. Poll for result
GET /agent/job/{jobId} polled every 2 seconds until the job reaches a
terminal state (complete, failed, or cancelled). Timeout is 120
seconds.3. Display result
3. Display result
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
Install and run
Install and run
The CLI entry point is a Bun script:To use it as a global
arb command, link the binary:Point to a remote API
Point to a remote API
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.