Skip to main content

benchweave token

Mint an operator bearer token from a data directory’s signing secret.

benchweave token [OPTIONS]

This is the missing step between setup and every authenticated surface: setup writes the signing secret, and ui-login, the REST API and the MCP transport all need a bearer token. The secret is read through the same bridge serve uses and is never printed; only the token is.

Full --help output
Usage: benchweave token [OPTIONS]

  Mint an operator bearer token from a data directory's signing secret.

  This is the missing step between ``setup`` and every authenticated surface:
  ``setup`` writes the signing secret, and ``ui-login``, the REST API and the
  MCP transport all need a bearer token. The secret is read through the same
  bridge ``serve`` uses and is never printed; only the token is.

Options:
  --data-dir PATH           At-rest data directory (holds state.sqlite +
                            content/).  [required]
  --scope TEXT              Scope to grant (repeatable). Default: stg:observe,
                            the least privilege that reaches the read-only UI.
  --ttl-mins INTEGER RANGE  Token lifetime in minutes (default: 720).  [x>=1]
  --json                    Emit the stable machine JSON contract instead of
                            text.
  --help                    Show this message and exit.

Options

--data-dir: PATH
Required. At-rest data directory (holds state.sqlite + content/). Environment variable: BENCHWEAVE_DATA_DIR.
--scope: TEXT
Scope to grant (repeatable). Default: stg:observe, the least privilege that reaches the read-only UI.
--ttl-mins: INTEGER RANGE
Token lifetime in minutes (default: 720).
--json
Emit the stable machine JSON contract instead of text.