Skip to content

Config Commands

Manage CLI configuration settings.

Global options available on all config commands: --json, --no-color.

Configuration is stored in a JSON file at:

  • Linux/macOS: ~/.config/bb/config.json
  • Windows: %APPDATA%\bb\config.json

The configuration file stores your CLI settings and authentication credentials.

KeyDescription
usernameBitbucket username (set during auth login)
apiTokenBitbucket API token (set during auth login, masked in output)
defaultWorkspaceDefault workspace for commands
skipVersionCheckDisable update notifications (default: false)
versionCheckIntervalDays between update checks (default: 1)

The config file is stored as JSON:

{
"username": "myuser",
"apiToken": "***",
"defaultWorkspace": "myworkspace",
"skipVersionCheck": false,
"versionCheckInterval": 1
}

Get a configuration value.

Terminal window
bb config get <key>
ArgumentDescription
keyConfiguration key to retrieve
Terminal window
# Get default workspace
bb config get defaultWorkspace
# Get username
bb config get username
# Get output as JSON
bb config get defaultWorkspace --json
OptionDescription
--jsonOutput as JSON

Set a configuration value.

Terminal window
bb config set <key> <value>
ArgumentDescription
keyConfiguration key to set
valueValue to set (parsed by key type)

bb config set validates and stores typed values for known typed keys:

KeyAccepted valuesStored type
defaultWorkspaceAny stringstring
skipVersionChecktrue or falseboolean
versionCheckIntervalPositive integer (>= 1)number
Terminal window
# Set default workspace
bb config set defaultWorkspace myworkspace
# Disable update notifications
bb config set skipVersionCheck true
# Check for updates weekly instead of daily
bb config set versionCheckInterval 7
# Invalid values are rejected
bb config set skipVersionCheck maybe
# Get output as JSON
bb config set defaultWorkspace myworkspace --json

Example JSON output for typed keys:

{ "success": true, "key": "skipVersionCheck", "value": true }
OptionDescription
--jsonOutput as JSON

List all configuration values.

Terminal window
bb config list [options]
OptionDescription
--jsonOutput as JSON
Terminal window
# List all config
bb config list
# List as JSON for scripting
bb config list --json
Config file: /Users/you/.config/bb/config.json
KEY VALUE
----------------- ---------
username myuser
defaultWorkspace myworkspace
apiToken ********