Skip to main content
The CLI builds its command list from the Bento API. Endpoints are grouped by tag, so each one becomes bentolabs <group> <command>.
When a command you expect is missing, bentolabs refresh pulls a fresh command list from the API.

How arguments work

A generated command takes three kinds of input: path params, query params, and a request body. Path params like /things/{thing_id} become required positional arguments, in the same order as the path. The workspace_id path param is the exception. It’s never a positional; the CLI fills it from --workspace or the saved default. Query params become keyword --flags, with types drawn from the API spec (string, int, float, bool, list). Repeat the flag to pass a list. A request body arrives through --data '<json>', --data-file <path>, or stdin.
With no workspace set, the CLI prints a hint pointing at bentolabs workspaces list and bentolabs workspaces use <id>.

Shared flags

These flags work on every generated command:

Output modes

Pretty-printed JSON is the default. Switch with --output: Table mode also unwraps the common {"items": [...], "next_cursor": ...} shape, so list endpoints render directly.

Built-in commands

A small set of commands are hand-written rather than generated.

auth

Sign in, sign out, and check who you are.
Tokens refresh automatically near expiry. If a refresh fails, say because another process already rotated it, the next command returns a clean 401 and asks for bentolabs auth login again.

workspaces use

Save a default workspace so other commands don’t need --workspace.
The flag wins over the saved default when both are present.

raw

Send a raw request to any API path, for endpoints the generated tree doesn’t expose cleanly.
raw uses the same auth and --output modes as generated commands. It passes path params through untouched, including workspace_id. The body comes from --data or --data-file only, not from stdin.

refresh

Pull a fresh copy of the command list from the API. Run this when an endpoint is missing from --help.
The output reports how many operations were cached.

config

Inspect the active CLI configuration.
config show prints the current values and the path to the config file on disk. auth login writes the tokens, and workspaces use writes the default workspace. The config file is created with 0600 permissions.

version

Print the installed CLI version.

Examples

List the 5 most recent traces in the default workspace:
Pipe trace IDs into another command:
Call an endpoint that isn’t in the cached command tree yet:
Send a request that the generated tree doesn’t cover:

See also

Installation

Install the CLI and sign in.

Python SDK

Send traces and signals from your code.