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 | bashThis 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 | bashTo install a specific version:
curl -fsSL https://go.bzrk.dev | bash -s v1.0.15Platform support
The CLI is available for Linux (x86_64 and aarch64) and macOS (Apple Silicon).
Getting Started
Once installed, verify the installation:
bzrk --helpProfiles
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:
| Field | Required | Description |
|---|---|---|
endpoint | Yes | Query service URL |
meta_endpoint | No | Meta service URL (derived from endpoint if not set) |
username | No | Sent as x-bzrk-username header for user identification |
otlp_endpoint | No | OpenTelemetry 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-envUsing 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:
- Explicit
--endpoint/--meta-endpointflags - Named profile via
-P/--profile - Active profile (set with
bzrk profile use) - Default (
http://localhost:9510)