Config Commands
Manage CLI configuration settings.
Global options available on all config commands: --json, --no-color.
Configuration File
Section titled “Configuration File”Configuration is stored in a JSON file at:
- Linux/macOS:
~/.config/bb/config.json - Windows:
%APPDATA%\bb\config.json
Available Settings
Section titled “Available Settings”The configuration file stores your CLI settings and authentication credentials.
| Key | Description |
|---|---|
username | Bitbucket username (set during auth login) |
apiToken | Bitbucket API token (set during auth login, masked in output) |
defaultWorkspace | Default workspace for commands |
skipVersionCheck | Disable update notifications (default: false) |
versionCheckInterval | Days between update checks (default: 1) |
Configuration File Format
Section titled “Configuration File Format”The config file is stored as JSON:
{ "username": "myuser", "apiToken": "***", "defaultWorkspace": "myworkspace", "skipVersionCheck": false, "versionCheckInterval": 1}bb config get
Section titled “bb config get”Get a configuration value.
bb config get <key>Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
key | Configuration key to retrieve |
Examples
Section titled “Examples”# Get default workspacebb config get defaultWorkspace
# Get usernamebb config get username
# Get output as JSONbb config get defaultWorkspace --jsonOptions
Section titled “Options”| Option | Description |
|---|---|
--json | Output as JSON |
bb config set
Section titled “bb config set”Set a configuration value.
bb config set <key> <value>Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
key | Configuration key to set |
value | Value to set (parsed by key type) |
Typed Value Parsing
Section titled “Typed Value Parsing”bb config set validates and stores typed values for known typed keys:
| Key | Accepted values | Stored type |
|---|---|---|
defaultWorkspace | Any string | string |
skipVersionCheck | true or false | boolean |
versionCheckInterval | Positive integer (>= 1) | number |
Examples
Section titled “Examples”# Set default workspacebb config set defaultWorkspace myworkspace
# Disable update notificationsbb config set skipVersionCheck true
# Check for updates weekly instead of dailybb config set versionCheckInterval 7
# Invalid values are rejectedbb config set skipVersionCheck maybe
# Get output as JSONbb config set defaultWorkspace myworkspace --jsonExample JSON output for typed keys:
{ "success": true, "key": "skipVersionCheck", "value": true }Options
Section titled “Options”| Option | Description |
|---|---|
--json | Output as JSON |
bb config list
Section titled “bb config list”List all configuration values.
bb config list [options]Options
Section titled “Options”| Option | Description |
|---|---|
--json | Output as JSON |
Examples
Section titled “Examples”# List all configbb config list
# List as JSON for scriptingbb config list --jsonOutput
Section titled “Output”Config file: /Users/you/.config/bb/config.json
KEY VALUE----------------- ---------username myuserdefaultWorkspace myworkspaceapiToken ********