bt setup is a deprecated command that configures Braintrust integrations for coding agents (Claude, Copilot, Cursor, Codex, Gemini, Opencode, Qwen). For existing automation, it can give your agent access to Braintrust skills, workflow documentation, and MCP tools.
bt setup and bt trace setup do different jobs. bt setup gives your agent tools to work with Braintrust, such as skills and MCP access. bt trace setup makes Braintrust observe your agent by tracing its sessions.bt setup opens a browser to sign in or sign up, then prompts in the terminal to select an organization and project. No manual API key setup is required beforehand. The created API key is exported to the setup process (so sub-commands like bt setup instrument work immediately) and printed with a ready-to-copy export BRAINTRUST_API_KEY=<key> command. Run it to make the key available in your current terminal session. After a successful run, bt setup displays a verification prompt.
The browser-based flow requires a desktop environment. On headless servers, authenticate with
bt login --no-browser or set BRAINTRUST_API_KEY directly.By default,
bt setup authenticates, creates an API key, and runs instrumentation (detecting your project language, installing the SDK, and instrumenting LLM clients). Pass --no-instrument to skip instrumentation. Skills and MCP config are not installed unless you pass --skills or --mcp. To install only skills after initial setup, run bt setup skills.--no-input. This requires --project <NAME>, BRAINTRUST_API_KEY, and --agent <AGENT> unless exactly one supported agent is on PATH. The --api-key <KEY> flag still works for compatibility, but it is deprecated.
bt setup skills
Writes agent-specific skill files so your agent knows how to use Braintrust. Also prefetches workflow docs. Install locations by agent: Claude (.claude/skills/braintrust/SKILL.md), Copilot (.copilot/skills/braintrust/SKILL.md), Cursor (.cursor/skills/braintrust/SKILL.md), Gemini (.gemini/skills/braintrust/SKILL.md), Qwen (.qwen/skills/braintrust/SKILL.md).
bt setup instrument
Runs a coding agent against your repo to automatically add Braintrust SDK instrumentation (tracing, logging). The agent detects your project language, installs the exact SDK version, instruments your LLM clients, runs the app to verify the integration, and outputs a Braintrust permalink to the emitted trace.- Verifies that
BRAINTRUST_API_KEYis set — aborts if missing - Detects the project language from build files:
package.json→ TypeScript,requirements.txt/pyproject.toml→ Python,pom.xml/build.gradle→ Java,go.mod→ Go,Gemfile→ Ruby,.csproj→ C# - Looks up and installs the latest exact SDK version (never uses
latest) - Instruments LLM clients in the app entry point
- Runs the app to verify traces are emitted
- Outputs a Braintrust permalink to the captured trace
BRAINTRUST_API_KEY set.
Supported languages: Python, TypeScript/JavaScript, Go, Java, Ruby, C#
Instrumentation approach by language:
Instrument-specific flags: