> ## Documentation Index
> Fetch the complete documentation index at: https://developer.bron.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

<Card title="GitHub">
  [https://github.com/bronlabs/bron-cli](https://github.com/bronlabs/bron-cli)
</Card>

`bron` is the public command-line client for the Bron API. A single static binary, regenerated from the OpenAPI spec on every API release — every endpoint and every request/response field reachable from the shell, 1:1 with the spec.

The CLI is designed to be a first-class surface for both humans and LLM agents:

* Every command speaks both `--help` (humans) and `--schema` (machines).
* Stable exit codes, structured error output with a trace ID on every 4xx/5xx.
* JSON / YAML / JSONL / table output, projected with `--columns`; pipe to `jq` for richer transformations.
* Profiles for multi-workspace setups, env-var overrides for CI, HTTP/HTTPS proxy support.
* Live updates over WebSocket via `bron tx subscribe` — same filters as `bron tx list`, live-only by default with transparent auto-reconnect (pass `--with-history` for an initial replay).

## Install

<CodeGroup>
  ```bash macOS / Linux (Homebrew) theme={"system"}
  brew install bronlabs/apps/bron
  ```

  ```bash Pre-built binary (any UNIX) theme={"system"}
  OS=$(uname -s | tr '[:upper:]' '[:lower:]')
  ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
  curl -L "https://github.com/bronlabs/bron-cli/releases/latest/download/bron-${OS}-${ARCH}" \
    -o /usr/local/bin/bron
  chmod +x /usr/local/bin/bron
  ```

  ```powershell Windows theme={"system"}
  # Download from releases page and place on PATH:
  #   https://github.com/bronlabs/bron-cli/releases/latest/download/bron-windows-amd64.exe
  ```

  ```bash From source (Go 1.26+) theme={"system"}
  go install github.com/bronlabs/bron-cli/cmd/bron@latest
  ```
</CodeGroup>

Available builds: `darwin-arm64`, `darwin-amd64`, `linux-arm64`, `linux-amd64`, `windows-amd64.exe`. Every release ships SHA256 checksums on the [releases page](https://github.com/bronlabs/bron-cli/releases/latest).

## Quickstart

```bash theme={"system"}
# 1. Interactive bootstrap: the CLI generates a P-256 keypair (private JWK at
#    0600), prints the public JWK, and waits.
#    `--key-file` pointing to a non-existent path → CLI generates a fresh key
#    there. Pointing at an existing file → CLI re-derives + prints the public.
bron config init --key-file ~/.config/bron/keys/me.jwk

# 2. Open Settings → API keys in the Bron UI and paste the printed public JWK
#    into the "✓ Input public key (JWK)" field.
open https://app.bron.org/settings/api-keys

# 3. Press Enter back in the CLI. It calls GET /workspaces with the fresh key,
#    auto-resolves the workspace ID, validates the registration in one
#    round-trip, and writes the profile to ~/.config/bron/config.yaml.

# 4. Sanity-check.
bron config show
bron workspace info

# 5. First request.
bron accounts list --statuses active --limit 5
bron balances list --nonEmpty true --output table
bron tx list --transactionStatuses signing-required --limit 10
```

If you already know the workspace ID (CI / scripts), pass it explicitly and the CLI skips the auto-discovery prompt:

```bash theme={"system"}
bron config init --name default --workspace <workspaceId> --key-file ~/.config/bron/keys/me.jwk
```

Non-interactive runs (no TTY on stdin) require `--workspace` — the auto-discovery prompt has no scripted equivalent, and failing fast beats silently saving an unverified profile.

For a deeper walkthrough of profiles, multiple environments, and env-var overrides, see [Authentication & profiles](/sdk/cli/auth).

## How commands are shaped

Every endpoint in the OpenAPI spec becomes a command:

```
bron <resource> <verb> [<positional-id>...] [--<field>...] [--file <path> | --json '{...}']
```

* **`<resource>`** — first URL segment, lowercased and shortened where useful (`tx` for `transactions`, `address-book` for `address-book-records`, etc.)
* **`<verb>`** — remaining path segments verbatim (`list`, `get`, `create`, `accept-deposit-offer`, `create-signing-request`, …)
* **`{workspaceId}`** is implicit (from the active profile or `--workspace`); other path params are positional in URL order.
* **Query parameters** become `--<name>` flags; **body fields** become `--<field>` / `--<a>.<b>` flags.

### Special case: `bron tx <type>`

`bron tx withdrawal`, `bron tx allowance`, `bron tx stake-delegation`, and other type-specific subcommands are shortcuts for `bron tx create --transactionType <type>`, with the type-specific body fields exposed as `--params.<field>`. Per-type `--help` shows exactly which params each transaction shape expects.

```bash theme={"system"}
bron tx withdrawal \
  --accountId  <accountId> \
  --externalId <idempotencyKey> \
  --params.amount=100 \
  --params.assetId=5000 \
  --params.networkId=ETH \
  --params.toAddressBookRecordId=<recordId>
```

List the available types with `bron tx --help`.

## Common commands

```bash theme={"system"}
# Accounts and balances.
bron accounts list --statuses active --limit 50
bron balances list --nonEmpty true --embed prices            # adds usdValue per balance

# Transactions.
bron tx list --transactionStatuses waiting-approval,signing
bron tx list --transactionTypes withdrawal --createdAtFrom 2026-01-01 --embed assets
bron tx get    <transactionId>
bron tx events <transactionId>

# Approvals & signing.
bron tx approve <transactionId>
bron tx decline <transactionId>
bron tx cancel  <transactionId>
bron tx create-signing-request <transactionId>

# Live updates over WebSocket — see /sdk/cli/subscribe for details.
bron tx subscribe --transactionStatuses signing-required,waiting-approval
```

## Where to next

<CardGroup cols={2}>
  <Card title="Authentication & profiles" icon="key" href="/sdk/cli/auth">
    Keypair lifecycle, multiple profiles, env-var overrides, proxy setup, rotation.
  </Card>

  <Card title="Output & schema" icon="brackets-curly" href="/sdk/cli/output">
    `json` / `yaml` / `jsonl` / `table`, `--columns`, `--schema`, `--embed`, piping to `jq`.
  </Card>

  <Card title="Live updates (`tx subscribe`)" icon="satellite-dish" href="/sdk/cli/subscribe">
    Filters, snapshot semantics, auto-reconnect contract, `--debug`, JSONL piping recipes.
  </Card>

  <Card title="MCP server (`bron mcp`)" icon="plug" href="/sdk/cli/mcp">
    Run the CLI as a stdio MCP server. Typed tools for Claude Code, Cursor, Cline, Desktop. `--read-only` mode.
  </Card>

  <Card title="Cookbook" icon="book" href="/sdk/cli/cookbook">
    Five real-world flows: bulk approvals, incoming-transfer watcher, treasury rebalance, audit export, agent automation.
  </Card>

  <Card title="LLM agent integration" icon="robot" href="/sdk/cli/agents">
    Discovery via `--schema`, prompts, exit-code-driven flows, idempotency, dry-runs.
  </Card>

  <Card title="Errors & exit codes" icon="triangle-exclamation" href="/sdk/cli/errors">
    Mapping HTTP → exit, error envelope shape, correlation IDs, retry strategy.
  </Card>
</CardGroup>
