BBramaDocs
Browse documentation

Brama CLI command reference

brama serve

Start the OpenAI-compatible HTTP server.

Invocation

brama serve [-p <PORT>|--port <PORT>] [--local-credentials-stdin]
InputRequired/defaultMeaning
-p, --port <PORT>optional; 8080TCP port to listen on.
--local-credentials-stdinoptional; offRead one provider-to-credential JSON object from stdin and run in standalone mode.

Managed mode requires the launcher-provided environment. Standalone mode requires a JSON object such as {"openai":"sk-..."} on stdin when the flag is present.

Output and state

The process logs startup to stderr, binds the requested port, and serves until stopped. Standalone credentials are consumed, installed only in process memory, and zeroized from the input buffer; the command does not persist them.

Refusals

A failed stdin read prints Server error: cannot read local credentials: <error>. An invalid credential object or any server startup failure prints Server error: <error>. All exit 1. A bare managed start without generated aliases refuses exactly:

Server error: BRAMA_MODEL_ALIASES is required and is assembled by
src/release/bin/start-with-skarbiec from the sealed policy directory. Starting the
binary directly cannot obtain it: launch the gateway through that launcher, or
export the variable yourself. Restarting an unlaunched process will not
change this answer.

See the runbook and the CLI tree.