Skip to content

Configuration

The CLI uses a layered configuration system with multiple sources. Higher priority sources override lower ones.

  1. Environment variables (highest) - VSB_API_KEY, VSB_BASE_URL
  2. Config file (lowest) - ~/.config/vsb/config.yaml

Run the configuration wizard to set up credentials interactively:

Terminal window
vsb config

This prompts for your API key and gateway URL, then saves them to the config file.

Terminal window
# Set API key
vsb config set api-key "your-api-key"
# Set gateway URL
vsb config set base-url "https://your-gateway.vsx.email"
Terminal window
vsb config show

The API key is masked in the output for security.

The config file is stored at ~/.config/vsb/config.yaml:

api_key: your-api-key
base_url: https://your-gateway.vsx.email
default_output: pretty
KeyDescriptionDefault
api_keyYour VaultSandbox API key-
base_urlGateway server URL-
default_outputOutput format (pretty or json)pretty

Note: default_output can only be set by editing the config file directly. The vsb config set command only supports api-key and base-url.

VariableDescription
VSB_API_KEYYour VaultSandbox API key
VSB_BASE_URLGateway URL
VSB_CONFIG_DIROverride config directory
VSB_OUTPUTDefault output format

Example:

Terminal window
export VSB_API_KEY="your-api-key"
export VSB_BASE_URL="https://your-gateway.vsx.email"
vsb inbox create

These flags work with any command:

FlagDescription
--configSpecify config file path
-o, --outputOutput format: pretty or json

Example:

Terminal window
vsb inbox list --output json

The CLI stores data in ~/.config/vsb/:

FileDescription
config.yamlConfiguration settings
keystore.jsonInbox private keys (base64-encoded)