bt profiles manages saved Braintrust login profiles and diagnoses orphaned credentials. A profile stores local login metadata and credentials for one Braintrust app URL. Organization and project context are selected separately with bt switch.
Use bt status --all when you need to verify whether saved profiles still have valid credentials.
Deleting a profile removes local profile metadata and stored credentials. It does not revoke API keys or sign you out of the Braintrust web app.
When you rename a profile, bt updates references to it in the global ~/.config/bt/config.json file (or $XDG_CONFIG_HOME/bt/config.json) and the active local .bt/config.json file for the current directory. Deleting a profile clears those references.
Subcommands
Examples
Diagnose and repair orphaned credentials
Normally, bt profiles delete and bt logout remove both a saved profile’s metadata and its local credentials. If credential cleanup fails or is interrupted, or if auth.json is edited or deleted manually, credentials can remain after the profile is gone. bt can no longer use them through the deleted profile, but the secrets remain on the machine.
Choose a cleanup method based on what you know:
-
Find and remove leftovers from the plaintext fallback store: Run
bt profiles doctor to list entries in secrets.json that do not match a saved profile. Then run bt profiles repair without a profile name to remove them. These commands do not inspect or change the OS credential store.
-
Remove credentials for a known deleted profile: Pass one or more deleted profile names to
bt profiles repair. This form attempts to remove any API key, OAuth access token, and OAuth refresh token stored for each name from both the OS credential store and secrets.json.
bt profiles repair deletes local credentials. Before repairing the plaintext fallback store, run bt profiles doctor to list the affected entries. When repairing by name, verify each deleted profile name carefully. The repair prompt reports only a count.
Flags
bt profiles accepts shared global flags, including --json and --profile. --json works with every subcommand.