jump to content

CLI configuration

Configure the prb CLI's config.yaml preferences, active host and organization selection, and ZEBRABYTE_HOST/ZEBRABYTE_TOKEN environment variable overrides.

View as Markdown

The CLI keeps preferences and authenticated hosts in an operating-system user configuration file. Use prb config for supported preferences and prb auth for host credentials. Do not edit token fields by hand.

# Show every supported preference and its current value
prb config list

# Read one value
prb config get http_timeout

# Set one value
prb config set http_timeout 60s

Supported keys:

KeyAccepted valueCurrent behavior
browserBrowser command or executableOpens device authorization and prb browse with the selected browser
http_timeoutGo duration such as 30s, 2m, 1m30sSets API request timeout; defaults to 30s when unset or invalid
promptenabled or disabledStored for compatibility; use --no-interactive or environment settings today
editorEditor command or executableStored for compatibility; current commands do not launch an editor
pagerPager command or executableStored for compatibility; current commands do not launch a pager

prb config set validates prompt and http_timeout. Unknown keys are rejected.

The CLI stores config.yaml in the platform user configuration directory:

PlatformDefault path
macOS~/Library/Application Support/prb/config.yaml
Linux${XDG_CONFIG_HOME:-~/.config}/prb/config.yaml
Windows%AppData%\prb\config.yaml

The containing directory is created with user-only permissions where the platform supports POSIX modes, and the file is written with mode 0600.

In addition to preferences, the file contains:

  • active_host, which selects the default deployment.
  • One hosts entry per authenticated deployment.
  • The access token, refresh token, token endpoint, and default organization for each host.

prb auth login normalizes and stores the chosen host, then makes it active. Commands use hosts in this order:

  1. PROBO_HOST, when set.
  2. The stored active_host.
  3. The first stored host, sorted by name.

The default organization is stored with each host during login. Commands that support --org use that flag as an operation-specific override.

To change the active host, authenticate to it again:

prb auth login --hostname us.probo.com

Use prb auth status to see which host is active and which hosts have a default organization.

VariableEffect
PROBO_HOSTSelects a deployment and overrides the stored active host
PROBO_TOKENReplaces the selected host’s access token for the current process
PROBO_NO_INTERACTIVEDisables prompts when set to 1 or true
CIDisables prompts when set to 1 or true
DEBIAN_FRONTENDDisables prompts when set to noninteractive
NO_COLORDisables ANSI color whenever the variable is present
TERMdumb disables prompts and ANSI color

When PROBO_HOST names a stored host, its saved default organization still applies. PROBO_TOKEN does not persist and does not update the configuration file.

For a stateless CI job, set both host and token:

PROBO_HOST=https://eu.probo.com \
PROBO_TOKEN="$PROBO_CI_TOKEN" \
prb framework list --no-interactive --no-color --output json

When only PROBO_TOKEN is set, at least one host must already be configured. Set PROBO_HOST as well when the job should not depend on local state.

SymptomLikely cause or action
not logged inRun prb auth login, or set both PROBO_HOST and PROBO_TOKEN
Token is set but no host is configuredSet PROBO_HOST or authenticate once to establish a host
Requests reach the wrong deploymentCheck PROBO_HOST and the active host shown by prb auth status
Commands target the wrong organizationPass --org, or log in again and choose the intended default organization
Configuration cannot be parsedRestore valid YAML; preserve the file securely before replacing it
Requests time out too quicklyIncrease http_timeout, for example prb config set http_timeout 2m

title: CLI Configuration description: Configure the ZebraByte CLI behavior and preferences


The prb config commands manage CLI configuration settings. These control how prb interacts with your terminal and external tools.

KeyDescription
editorText editor for editing operations
browserWeb browser for prb browse and other URL-opening commands
pagerPager for long output (e.g., less)
promptPrompt style
http_timeoutHTTP request timeout
prb config set editor vim
prb config get editor
prb config list
prb browse
FlagDescription
--no-browser, -nPrint the URL instead of opening the browser
--orgOrganization ID to open

Generate shell completion scripts for your shell:

prb completion bash   # Bash
prb completion zsh    # Zsh
prb completion fish   # Fish
prb completion powershell  # PowerShell
prb version

Execute raw GraphQL queries against the the platform API:

prb api 'query { organizations { nodes { id name } } }'

With variables:

prb api 'query($id: ID!) { organization(id: $id) { name } }' -f id=org_xxx
FlagDefaultDescription
-fGraphQL variables as key=value pairs (values parsed as JSON, fallback to string)
--schemaconsoleSchema endpoint: console or connect

Queries can also be piped from stdin:

echo 'query { organizations { nodes { id } } }' | prb api

Ultima actualizare: