Berserk Docs

Berserk CLI

Command-line tool for interacting with Berserk

The Berserk CLI provides command-line access for querying data, managing clusters, and automation. It pairs especially well with AI coding agents like Claude Code for investigating production issues.

Installation

curl -fsSL https://go.bzrk.dev | bash

This installs the bzrk binary to ~/.local/bin. You can override the install directory with BZRK_INSTALL_DIR:

BZRK_INSTALL_DIR=/usr/local/bin curl -fsSL https://go.bzrk.dev | bash

To install a specific version:

curl -fsSL https://go.bzrk.dev | bash -s v1.0.15

Platform support

The CLI is available for Linux (x86_64 and aarch64) and macOS (Apple Silicon).

Getting Started

Once installed, verify the installation:

bzrk --help

Profiles

Profiles let you store named connection configurations so you can switch between environments (local, dev, production) without remembering endpoint URLs.

Configuration file

User profiles are stored in ~/.config/bzrk/profiles.toml (following the XDG Base Directory Specification). The file uses TOML format:

active = "dev"

[profiles.local]
endpoint = "http://localhost:9510"

[profiles.dev]
endpoint = "http://query.dev.example.com:9510"
meta_endpoint = "http://meta.dev.example.com:9500"
username = "alice"
otlp_endpoint = "http://otel.dev.example.com:4317"

The top-level active field stores the name of the currently active profile (set via bzrk profile use). This profile is used by default when no -P flag is provided.

Each profile has the following fields:

FieldRequiredDescription
endpointYesQuery service URL
meta_endpointNoMeta service URL (derived from endpoint if not set)
usernameNoSent as x-bzrk-username header for user identification
otlp_endpointNoOpenTelemetry endpoint for trace export

Repository defaults

Teams can share profiles by placing a .bzrk_config file in the repository root. The CLI walks up from the current directory to find this file and merges its profiles into the user store. User profiles with the same name always take precedence.

# .bzrk_config
[profiles.local]
endpoint = "http://localhost:9510"

[profiles.staging]
endpoint = "http://query.staging.example.com:9510"

Managing profiles

# List all profiles (active profile marked with *)
bzrk profile list

# Add a new profile
bzrk profile add dev --endpoint http://query.dev.example.com:9510

# Add with optional fields
bzrk profile add prod \
  --endpoint http://query.prod.example.com:9510 \
  --meta-endpoint http://meta.prod.example.com:9500 \
  --username alice \
  --otlp-endpoint http://otel.prod.example.com:4317

# Set active profile (used by default)
bzrk profile use dev

# Remove a profile
bzrk profile remove old-env

Using profiles

The active profile is used automatically. To override it for a single command:

# Use a specific profile
bzrk -P prod query 'Traces | take 10'

# Or with the long flag
bzrk --profile prod query 'Traces | take 10'

Resolution order — the CLI resolves connection settings in this order:

  1. Explicit --endpoint / --meta-endpoint flags
  2. Named profile via -P / --profile
  3. Active profile (set with bzrk profile use)
  4. Default (http://localhost:9510)

On this page