Skip to content

Config Commands

Manage CLI configuration settings.

Configuration File

Configuration is stored in a JSON file at:

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

Available Settings

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)
workspaceDefault workspace for commands
repoDefault repository for commands

Configuration File Format

The config file is stored as JSON:

{
"username": "myuser",
"apiToken": "***",
"workspace": "myworkspace",
"repo": "myrepo"
}

bb config get

Get a configuration value.

Terminal window
bb config get <key>

Arguments

ArgumentDescription
keyConfiguration key to retrieve

Examples

Terminal window
# Get default workspace
bb config get workspace
# Get username
bb config get username

bb config set

Set a configuration value.

Terminal window
bb config set <key> <value>

Arguments

ArgumentDescription
keyConfiguration key to set
valueValue to set

Examples

Terminal window
# Set default workspace
bb config set workspace myworkspace
# Set default repository
bb config set repo myrepo

bb config list

List all configuration values.

Terminal window
bb config list [options]

Options

OptionDescription
--jsonOutput as JSON

Examples

Terminal window
# List all config
bb config list
# List as JSON for scripting
bb config list --json

Output

Config file: /Users/you/.config/bb/config.json
KEY VALUE
----------------- ---------
username myuser
workspace myworkspace
appPassword ********