jump to content

CLI configuration

Configure the config.yaml preferences of prb CLI, active host and organization selection, and overlap of environment variables ZEBRABYTE_HOST/ZEBRABYTE_TOKEN.

Show as Markdown

CLI keeps preferences and hosts authenticated in a user configuration file of the operating system. Use prb config for accepted preferences and prb auth for host credentials.

Terminal window
# 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:

Key Accepted value Current behavior
browser Browser command or executable Device authorization opens and prb browse with the selected browser
http_timeout Read more about: Setting the request timeAPI; by default to 30s when it is disabled or invalid
prompt enabled or disabled Saved for compatibility; use --no-interactive or environment settings today
editor Editor command or executable Saved for compatibility; current commands do not launch an editor
pager Pager command or executable Saved for compatibility; current commands do not launch a pager

prb config set valid prompt and http_timeout. unknown keys are rejected.

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

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

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

In addition to preferences, the file contains:

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

Host and organization selection

Section “Host and organization selection”

prb auth login normalizes and stores the selected host, then activates it.

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

Commands that support --org use that flag as an operation-specific overlap.

To change the active host, log in again:

Terminal window
prb auth login --hostname us.probo.com

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

Variable Effect
PROBO_HOST Select a deployment and override the stored active host
PROBO_TOKEN Replaces the host access token selected for the current process
PROBO_NO_INTERACTIVE Disable calls when set to 1 or true
CI Disable calls when set to 1 or true
DEBIAN_FRONTEND Disable calls when set to noninteractive
NO_COLOR Disable the ANSI color whenever the variable is present
TERM dumb disables the ANSI prompt and color

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

For a non-state CI job, set both host and token:

Terminal window
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 as when the load should not depend on the local state.

Symptom Likely cause or action
not logged in Run prb auth login or set both PROBO_HOST and PROBO_TOKEN
The token is set, but no host is configured Set PROBO_HOST or authenticate once to set a host
Requests reach the wrong deployment Check PROBO_HOST and the active host presented by prb auth status
Commands target the wrong organization Step --org or log in again and select the default organization
Configuration cannot be parsed Restore a valid YAML file; keep the file secure before replacement
Requests time out too quickly Increase ___ZBT_I18N_RUNTIME_BLOCK_232__, for example ___ZBT_I18N_RUNTIME_BLOCK_233__

Title: CLI Configuration Description: Configuring Behavior and PreferencesZebraByteCLI


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

Key Description
editor Text editor for editing operations
browser Browser for prb browse and other URL opening commands
pager Pager for long outputs (for example less)
prompt Prompt style
http_timeout HTTP request timeout
Terminal window
prb config set editor vim
Terminal window
prb config get editor
Terminal window
prb config list

Open the platform in your browser.

Section “Open the platform in your browser”
Terminal window
prb browse
Flag Description
--no-browser, -n Print the URL instead of opening the browser
--org Organization ID to open

Generate shell completion scripts for your shell:

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

Run bruteGraphQL queries against the API platform:

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

With variables:

Terminal window
prb api 'query($id: ID!) { organization(id: $id) { name } }' -f id=org_xxx
Flag Default Description
-f — GraphQL variables as pairs ___ZBT_I18N_RUNTIME_BLOCK_264__ (values parse as JSON, back to string)
--schema console Endpoint Scheme: console or connect

Questions can also be piped from stdin:

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

Ultima actualizare: