Skip to main content
bt experiments manages Braintrust experiments directly from the CLI.

Subcommands

SubcommandDescription
bt experiments listList all experiments in the current project
bt experiments view <name>Display experiment metadata (use compare for summary metrics)
bt experiments compare <base> <comparison>...Compare summary metrics for up to eight experiments (alias: summary)
bt experiments delete <name>Delete an experiment

bt experiments list

bt experiments list
Lists all experiments in the current project.

bt experiments view

Display an experiment’s metadata, including description, creation time, commit, dataset, visibility, and tags, along with a link to view results in the browser. To compare summary metrics across experiments, use bt experiments compare.
# View by name
bt experiments view my-experiment

# Open the experiment in your browser instead
bt experiments view my-experiment --web

Flags

FlagDescription
--name, -n <NAME>Experiment name (alternative to the positional argument)
--webOpen the experiment in your browser

bt experiments compare

Compare summary metrics for up to eight experiments side by side: one base experiment and up to seven comparisons. Pass experiment names, or a Braintrust experiment comparison URL copied from the app.
# Compare a base experiment against one or more comparisons
bt experiments compare baseline challenger-a challenger-b

# Use flags instead of positional arguments
bt experiments compare --base baseline --comparison challenger-a -c challenger-b

# Compare from a Braintrust comparison URL
bt experiments compare 'https://www.braintrust.dev/app/my-org/p/my-project/experiments/baseline?c=challenger'

# Include rows for metrics with zero or no change
bt experiments compare baseline challenger-a --all

Flags

FlagDescription
--base <NAME>Base experiment name (alternative to the first positional argument)
--comparison, -c <NAME>Comparison experiment name. Pass multiple times to compare several experiments
--url <URL>Braintrust experiment comparison URL
--allInclude rows for metrics with zero or no change

bt experiments delete

Delete an experiment and its results.
# Delete by name
bt experiments delete my-experiment

# Skip the confirmation prompt
bt experiments delete my-experiment --force

Flags

FlagDescription
--name, -n <NAME>Experiment name (alternative to the positional argument)
--force, -fSkip the confirmation prompt