Command-line interface for the Living Brain Service API.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/ChatAndBuild/livingbrain-cli/releases/latest/download/livingbrain-cli-installer.sh | shpowershell -ExecutionPolicy ByPass -c "irm https://github.com/ChatAndBuild/livingbrain-cli/releases/latest/download/livingbrain-cli-installer.ps1 | iex"If you prefer to build from source, install the Rust toolchain and run:
cargo build --release
./target/release/livingbrain --helpEvery request needs two values. Set them as environment variables, or pass the matching flag on any command:
| Value | Env var | Flag | Header sent |
|---|---|---|---|
| API key | LIVING_BRAIN_API_KEY |
--api-key |
x-api-key |
| Subject ID (required) | LIVING_BRAIN_SUBJECT_ID |
--subject-id |
x-subject-id |
The subject ID identifies the end user you're acting on behalf of and must be a UUID. Brains are owned by a subject, so it determines which brains the CLI can see.
export LIVING_BRAIN_API_KEY="<your api key>"
export LIVING_BRAIN_SUBJECT_ID="3f2b8c1e-7a4d-4e9b-9c2a-5d6e7f8a9b0c"A .env file in the working directory is also supported — the CLI auto-loads it on startup.
List available commands:
livingbrain --helpCall an API endpoint:
livingbrain <resource> <method>Run livingbrain <resource> --help to see available methods for a resource.
Every API resource appears as a subcommand (e.g. livingbrain <resource> <method>). Run livingbrain <resource> --help to see available methods.
Provide request parameters as flags or as JSON:
livingbrain <resource> <method> --json '{"key": "value"}'See reference.md for the full command reference.
These flags are available on every operation:
| Flag | Description |
|---|---|
--dry-run |
Validate the request locally and print the HTTP request without sending it |
--json <JSON|-> |
Supply a request body as JSON (or - to read stdin) |
--params <JSON> |
Merge extra parameters as JSON (overrides individual flags) |
--format <json|table|yaml|csv> |
Output format (default json) |
--output <PATH> |
Write binary responses to a file |
--base-url <URL> |
Override the API base URL |
--no-extract |
Print the full response body instead of the x-fern-sdk-return-value extraction |
--no-retry |
Disable retries declared by x-fern-retries, including network errors |
-q, --quiet |
Suppress stdout output on success (errors still go to stderr) |
Operations the spec describes how to page (via x-fern-pagination or a root page_token parameter) also accept:
| Flag | Description |
|---|---|
--page-all |
Auto-paginate and stream results as NDJSON |
--page-limit <N> |
Max pages to fetch when auto-paginating (default 10) |
--page-delay <MS> |
Delay between page fetches in milliseconds (default 100) |
--no-pager |
Disable the pager even on interactive terminals |
Operations the spec marks as streaming (via x-fern-streaming) also accept:
| Flag | Description |
|---|---|
--no-stream |
Buffer the streaming response and print it as a single value once complete |
| Variable | Description |
|---|---|
LIVINGBRAIN_BASE_URL |
Override the API base URL |
LIVINGBRAIN_CA_BUNDLE |
Path to PEM file with extra trust roots (or SSL_CERT_FILE) |
LIVINGBRAIN_INSECURE=1 |
Skip TLS verification (debugging only) |
LIVINGBRAIN_PROXY |
HTTP(S) proxy URL |
LIVINGBRAIN_TIMEOUT_SECS |
Total request timeout in seconds |
Standard environment variables (HTTPS_PROXY / HTTP_PROXY / NO_PROXY / SSL_CERT_FILE) are also honored.
Use the global --format flag to control output. Supported values: json, table, yaml, csv, jsonl, raw, http.
Without --format, output (including errors) is table when stdout is a terminal and json when it is piped or redirected — so scripts and agents get JSON by default. Pass --human to keep the interactive rendering when piping to a pager, and --format json to pin JSON in a terminal.
# Pipe JSON output through jq
livingbrain <resource> <method> --format json | jq
# Keep the human rendering even when piped
livingbrain <resource> <method> --human | less
# Machine-readable catalog of every operation (same as --schema)
livingbrain --help --format json | jq '.operations | length'Generate shell completion scripts:
livingbrain completion <bash|zsh|fish|powershell>Built on fern-cli-sdk, Copyright Fern, licensed under the Apache License 2.0.