Documentation Index
Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
bt is the command-line interface for Braintrust. It lets you run evals, instrument your code, browse and query logs, sync data, manage functions, and configure coding agents without leaving your terminal.
Install
To install the latest version:~/.local/bin/bt (or $XDG_BIN_HOME/bt if set).
After installing, the installer prompts you to run bt setup. This writes Braintrust skill files for your coding agent. You can run it now or skip it and come back later. See Set up coding agents below.
To install a specific version:
Authenticate and set context
bt supports two authentication methods:
bt setup creates an API key for you interactively. See Set up coding agents below.
After authenticating, set a default org and project:
bt saves a context (a default org) so you don’t need to specify it on every command. The project must be set on each command with -p. You can always override the org with -o or environment variables.
Run evals locally
Run your evaluation files directly withoutnpx or SDK runner setup:
bt eval auto-detects your JavaScript runner (tsx, vite-node, ts-node) and supports Python eval files too. For other languages, run your eval file directly with your language’s toolchain. See bt eval for the full list of flags.
Run evals in CI
For CI pipelines, setBRAINTRUST_API_KEY instead of using OAuth login. See Run in CI/CD for the full workflow.
--no-input and --json for non-interactive output:
--first N or --sample N to run a subset of your data as a non-final smoke run on pull requests, then run the full suite on merge:
Browse and query logs
bt view logs opens an interactive terminal UI for browsing your project’s logs, useful for checking on production traffic or debugging during an incident:
bt sql runs SQL queries against your logs from the terminal or in scripts:
bt view and bt sql for details.
Sync data
bt sync downloads Braintrust data to local NDJSON files for offline analysis, backup, or migration:
bt sync for the full flag reference.
Set up coding agents
bt setup writes Braintrust skill files, workflow docs and optionally MCP server config into your agent’s config directory, giving your coding agent (Claude, Cursor, Codex, Opencode, Gemini) the context it needs to work with Braintrust.
It also detects your project language, installs the exact SDK version, instruments your LLM clients, verifies the app still runs, and outputs a Braintrust permalink to the captured trace:
bt setup for supported languages and all subcommands.
Manage functions
bt functions push uploads local TypeScript or Python function definitions (tools, scorers, LLM functions) to Braintrust. bt functions pull downloads them back to local files.
bt functions for bundling behavior, language options, and all flags.
Next steps
- Read the CLI overview for the complete command list, global flags, and environment variables
- See
bt functionsfor uploading and downloading function definitions - See Filter and search logs for SQL query examples against your logs
- See Run evaluations for eval workflow details