CLI

@valorbrain/cli: agent signup, MCP stdio proxy and memory from the shell. Zero dependencies, Node 18+.

Package: @valorbrain/cli. Runs without installing via npx -y @valorbrain/cli@latest <command>.

npx -y @valorbrain/cli@latest help --json

That JSON is the contract. If a blog post or README names a subcommand that is not in this object, the command does not exist. Every command and flag, generated from that JSON: CLI reference. This page explains the flow; it does not repeat the table.

The whole connection flow (token, MCP client, verify, claim) is in connect.md and the Quickstart.

Agent signup

npx -y @valorbrain/cli@latest init --agent --agent-caller <agent-name> --json

Creates an agent account (shadow tenant) with no email. With --json it prints a single JSON object with, among other fields:

FieldWhat it is
mcp_tokenvbm_… — the client credential: MCP at mcp_url and the engine REST API. Shown only in this response.
mcp_urlhttps://mcpbrain.valor.digital/mcp
api_keyvb_agent_… — agent account key (legacy): REST only and the claim, at https://valorbrain-api.valor.digital
noticeThe server's instruction to the agent (the signup message), with the claim notice to surface to the human
next_stepsThe remaining contract steps: per-client command, stdio, verify, claim

Everything is saved to ~/.valorbrain/config.json (mode 0600); the other commands read it from there.

--agent-caller is self-declared, never inferred from the environment. Forgot it? npx -y @valorbrain/cli identify <agent-name> is the idempotent backfill.

Human claim

npx -y @valorbrain/cli init --email <email>

Binds the account to an email with a one-time code (OTP by email). After the claim the human sees the memories in the app and the account outlives 30 days. The api_key and the mcp_token do not change and keep working before and after. See Claim an agent account.

MCP stdio proxy

npx -y @valorbrain/cli mcp

Stdio ↔ Streamable HTTP proxy to https://mcpbrain.valor.digital/mcp. Use it as the server command in any MCP client that only speaks stdio:

{
  "mcpServers": {
    "valorbrain": {
      "command": "npx",
      "args": ["-y", "@valorbrain/cli", "mcp"]
    }
  }
}

It uses the token saved by init. --token <vbm_…> or VALORBRAIN_MCP_TOKEN override it; --url or VALORBRAIN_MCP_URL change the endpoint.

The MCP host accepts only vbm_. A vb_/vb_agent_ key as a bearer gets 401 wrong_credential_type. See MCP.

@valorbrain/connect is a different package: the optional installer that writes the MCP server, rules and hooks into your harnesses (npx -y @valorbrain/connect@latest --token <vbm_…>). It is not the stdio proxy.

Memory from the shell (REST)

add, search, list and status talk REST with the api_key:

npx -y @valorbrain/cli add "the deploy key lives in the ops vault"
npx -y @valorbrain/cli search "deploy key"

The body is stored verbatim — no translation. Flags for each command: CLI reference.

Environment variables

VariableValueUse
VALORBRAIN_MCP_TOKENvbm_…MCP token (stdio proxy, HTTP clients such as Codex)
VALORBRAIN_API_KEYvb_agent_…REST key (add, search, …)
VALORBRAIN_API_URLURLREST base (default https://valorbrain-api.valor.digital)
VALORBRAIN_MCP_URLURLMCP endpoint (default https://mcpbrain.valor.digital/mcp)
VALORBRAIN_TOKEN—Legacy, deprecated. Still accepted with a warning: vbm_… counts as the MCP token; any other value as the REST key. Move to the two variables above.
VALORBRAIN_API_TOKEN—Legacy, deprecated. Still read as the REST key, with a warning on stderr. Move to VALORBRAIN_API_KEY.

Order: flag (--api-key, --token, --url) → environment variable → ~/.valorbrain/config.json.

On-premise (Enterprise)

npx -y @valorbrain/cli --url https://your-engine.example.com init --agent

There is no public one-line installer for the engine. On-prem is an Enterprise plan — accompanied deployment by our team on your network.

On this page