Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Braintrust CLI

$ bt Official Med Risk
Braintrust · Workspace & SaaS · Apache-2.0 · macos / linux / windows

Braintrust CLI (bt) manages AI evaluation projects, datasets, prompts/functions, and experiment logs from terminals and CI. Supports --json, --org, --profile, and headless execution via BRAINTRUST_API_KEY.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g @braintrust/bt
CLI vs MCP Decision CLI Preferred vs MCP

bt runs local eval suites, seeds datasets from local JSONL files, and invokes Braintrust functions with --json output directly in CI without MCP round-trips.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Supports --json across inspection commands, structured --input JSON on functions invoke, --profile / --org targeting, and env var auth.

  • Supports --json and --mode json output flags
  • Headless authentication via BRAINTRUST_API_KEY
Trust & Safety 20 / 25

Requires --force on destructive bt projects delete and isolates workspaces with --org / --profile, though dataset mutations lack --dry-run.

  • Destructive deletes gated by confirmation or explicit --force
  • Supports scoped API keys and named --profile contexts
Setup & Portability 13 / 15

Installable via @braintrust/bt on npm, npx, or standalone shell installer across macOS, Linux, and Windows.

  • Published on npm (@braintrust/bt) and bt.dev/cli/install.sh
Utility & Efficiency 13 / 15

Unifies datasets, projects, functions, and eval workflows in one fast CLI.

  • Covers datasets, eval, functions, projects, and topics
Maintenance & Lineage 9 / 10

Official Braintrust repository (braintrustdata/bt) under Apache-2.0 license.

  • First-party braintrustdata/bt repository
Docs & Verifiability 8 / 10

Well-documented CLI guides on braintrust.dev with clear flag references.

  • Official docs at braintrust.dev/docs/guides/cli

Security, Auth & Guardrails

Auth Modes
Env API Key OAuth Browser Config File
Credential Storage

Reads BRAINTRUST_API_KEY from the environment or named --profile configurations stored locally.

Side Effects
Read-Only Remote Write Destructive
Cost & Quotas

Apache-2.0 open-source CLI; requires a Braintrust account (free tier and paid plans available).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Braintrust CLI (bt) Agent Rules
- Set `BRAINTRUST_API_KEY` and pass `--org` / `--profile` explicitly to target the right workspace.
- Pass `--json` when inspecting projects or invoking functions.
- Require user confirmation before `bt projects delete` (especially with `--force`).

Agent-Ready Command Recipes

Safe Read-Only Queries

View a Braintrust project as JSON
bt projects view my-eval-project --json

Inspects project metadata and configuration in structured JSON.

Invoke a deployed Braintrust function
bt functions invoke --slug summarize --input '{"text":"hello"}' --mode json

Executes a prompt/function with structured --input and returns JSON output.

Controlled Writes & Previews

Create or seed a dataset from JSONL
bt datasets create --name smoke-suite --file ./evals/smoke.jsonl --json

Uploads local JSONL test cases into a Braintrust dataset.

Strengths for Agents

  • + Clean --json output and --profile/--org flags prevent workspace mix-ups in CI.
  • + Seamless local JSON/JSONL dataset seeding via --file.

Caveats & Pitfalls

  • ! No universal --dry-run on dataset uploads or function invocations.
  • ! Requires BRAINTRUST_API_KEY or prior login before querying remote state.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI