bt CLI. For installation and workflow examples, see the CLI quickstart.
Commands
Core
Projects and resources
Data and evaluation
Additional
Global flags
These flags are accepted by everybt command.
Environment variables
Troubleshooting
bt not found after install
bt not found after install
Open a new shell. Ensure
~/.local/bin (or $XDG_BIN_HOME if set) is in your PATH.OAuth login fails
OAuth login fails
On SSH,
bt auto-detects and prints the auth URL instead of opening a browser. Use --no-browser to force this behavior. The OAuth callback times out after 5 minutes. On remote hosts, paste the final callback URL from your local browser if the localhost callback can’t be delivered.No profile found
No profile found
Run
bt auth profiles --verbose to list saved profiles. Specify one with --profile or BRAINTRUST_PROFILE.Wrong org or project
Wrong org or project
Run
bt status --verbose to see where each value comes from (flag, env var, local config, or global config).Auth precedence
Auth precedence
When multiple credential sources are present,
bt resolves them in this order:--api-key <KEY>flag (always wins)BRAINTRUST_API_KEYenv var (wins unless--profileCLI flag or--prefer-profileis also set)--profile <NAME>orBRAINTRUST_PROFILE- A saved profile whose org matches the active org
- Auto-select if only one profile is saved
- Interactive picker if multiple profiles remain and
btis running in an interactive terminal
The interactive picker only runs in interactive terminals. In CI or other non-interactive environments with multiple saved profiles, set
BRAINTRUST_PROFILE or pass --profile to avoid an ambiguous-profile error.Token expired
Token expired
Run
bt auth refresh to force-refresh your OAuth token, or bt auth login to re-authenticate.Where are credentials stored?
Where are credentials stored?
bt stores credentials in your system’s secure credential store:- macOS: system keychain (via
security) - Linux: libsecret /
secret-toolif available; otherwise a0600-permission plaintext file - Windows:
0600-permission file (keychain integration not yet implemented)
Update fails
Update fails
bt update only works for installs made via the official installer. If you installed another way, update through your package manager.Uninstall
Uninstall
macOS and Linux:Windows (PowerShell):