Configuration
Configuration is stored at ~/.config/bitbucket-cli/config.toml:
[auth]username = "your-username"default_workspace = "your-workspace"| Key | Description |
|---|---|
auth.username |
The authenticated account’s username, set during login. |
auth.default_workspace |
Workspace used when a command omits one. This is the primary default-workspace key. |
defaults.workspace |
Legacy fallback for the default workspace, read only when auth.default_workspace is unset. Prefer auth.default_workspace. |
Resolving the workspace
Section titled “Resolving the workspace”Commands that take a workspace/repo-slug argument accept a bare repository slug and resolve the workspace in this order:
- The
--workspaceglobal flag. auth.default_workspacefrom the config file.defaults.workspace(legacy fallback).
# With a default workspace configured, both of these work:bitbucket repo view myworkspace/myrepobitbucket repo view myrepoGlobal flags
Section titled “Global flags”These flags are available on every command:
| Flag | Description |
|---|---|
--workspace <name> |
Workspace to use when omitted from arguments. |
--output <table|json> |
Output format. json emits machine-readable output — see Scripting with JSON. |
Environment variables
Section titled “Environment variables”| Variable | Purpose |
|---|---|
BITBUCKET_CLIENT_ID / BITBUCKET_CLIENT_SECRET |
OAuth consumer credentials for auth login --oauth. |
BITBUCKET_EMAIL / BITBUCKET_API_TOKEN |
Account email and API token for auth login --api-key. |