Skip to main content
Complete reference for the bt CLI. For installation and workflow examples, see the CLI quickstart.
Beta — This feature is subject to change.

Commands

Core

Projects and resources

Data and evaluation

Additional

Global flags

These flags are accepted by every bt command.

Environment variables

As of v0.6.0, bt no longer automatically loads .env files. Set environment variables explicitly in your shell (e.g., via export, --env-file <PATH>, or a tool like direnv) before running bt commands.

Troubleshooting

Open a new shell. Ensure ~/.local/bin (or $XDG_BIN_HOME if set) is in your PATH.
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.
Run bt auth profiles --verbose to list saved profiles. Specify one with --profile or BRAINTRUST_PROFILE.
Run bt status --verbose to see where each value comes from (flag, env var, local config, or global config).
When multiple credential sources are present, bt resolves them in this order:
  1. --api-key <KEY> flag (always wins)
  2. BRAINTRUST_API_KEY env var (wins unless --profile CLI flag or --prefer-profile is also set)
  3. --profile <NAME> or BRAINTRUST_PROFILE
  4. A saved profile whose org matches the active org
  5. Auto-select if only one profile is saved
  6. Interactive picker if multiple profiles remain and bt is 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.
Run bt auth refresh to force-refresh your OAuth token, or bt auth login to re-authenticate.
bt stores credentials in your system’s secure credential store:
  • macOS: system keychain (via security)
  • Linux: libsecret / secret-tool if available; otherwise a 0600-permission plaintext file
  • Windows: 0600-permission file (keychain integration not yet implemented)
bt update only works for installs made via the official installer. If you installed another way, update through your package manager.
macOS and Linux:
Windows (PowerShell):