원클릭으로
braintrust
Use the Braintrust `bt` CLI for projects, traces, prompts, and key Braintrust workflows.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use the Braintrust `bt` CLI for projects, traces, prompts, and key Braintrust workflows.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when a GitHub PR has CodeRabbit review-thread feedback that needs safe local triage, user-approved fixes, or a no-change review summary.
Use when a GitHub PR or branch has pending or failing PR-attached checks and needs repeated diagnosis until checks are green.
Use when a Vercel-backed release, PR merge, or promotion needs production traffic, aliases, runtime health, or related release gates verified.
Use when setting up, repairing, provisioning, or verifying local Lightfast PlanetScale database or Upstash Redis infrastructure, including db up, redis up, env files, pscale, upstash, and deleted dev-services commands.
Route protection with beforeLoad, redirect()/throw redirect(), isRedirect helper, authenticated layout routes (_authenticated), non-redirect auth (inline login), RBAC with roles and permissions, auth provider integration (Auth0, Clerk, Supabase), router context for auth state.
Framework-agnostic core concepts for TanStack Router: route trees, createRouter, createRoute, createRootRoute, createRootRouteWithContext, addChildren, Register type declaration, route matching, route sorting, file naming conventions. Entry point for all router skills.
| name | braintrust |
| version | 1.0.0 |
| description | Use the Braintrust `bt` CLI for projects, traces, prompts, and key Braintrust workflows. |
Use the Braintrust bt CLI for projects, traces, prompts, and sync workflows.
--json output can be piped to other tools.bt statusbt projects listbt prompts list --project <name>bt view logs --project <name>bt view trace --object-ref <ref> --trace-id <id>--json when results need further parsing.bt commands over direct API calls when both can accomplish the task.bt auth.Use these product workflow categories when deciding how to help users:
Instrument: SDK setup, spans/logging, metadata capture, tracing patterns.Observe: logs/traces inspection, dashboards, debugging production behavior.Annotate: feedback labels, human review loops, curation workflows.Evaluate: dataset/test-case based evals, scoring, regressions, guardrails.Deploy: prompt/version rollout, environment promotion, runtime controls.Primary docs index:
https://www.braintrust.dev/docsCategory entry pages:
https://www.braintrust.dev/docs/instrumenthttps://www.braintrust.dev/docs/observehttps://www.braintrust.dev/docs/annotatehttps://www.braintrust.dev/docs/evaluatehttps://www.braintrust.dev/docs/deployWhen uncertain, prefer precise bt CLI commands for local operations, and use docs context to
explain product concepts and recommended patterns.
Core reference docs are also prefetched, including SQL reference:
https://www.braintrust.dev/docs/reference/sqlbt evalFile selection:
bt eval — discover and run all eval files in the current directory (recursive)bt eval tests/ — discover eval files under a specific directorybt eval "tests/**/*.eval.ts" — glob patternbt eval a.eval.ts b.eval.ts — one or more explicit filesFiles inside node_modules, .venv, venv, site-packages, dist-packages, and __pycache__ are excluded from automatic discovery. Explicit paths and globs bypass these exclusions.
Runners:
bt eval auto-detects a JavaScript runner from your project (tsx, vite-node, ts-node, then ts-node-esm).--runner / BT_EVAL_RUNNER:
bt eval --runner vite-node tutorial.eval.tsbt eval --runner tsx tutorial.eval.tsbt resolves local node_modules/.bin entries automatically — no need for a full path.bt eval --runner vite-node tutorial.eval.tsPassing arguments to the eval file:
Use -- to forward extra arguments to the eval file via process.argv:
bt eval foo.eval.ts -- --description "Prod" --shard=1/4
Sampling modes:
bt eval --first 20 qa.eval.ts — run the first 20 examples and clearly label the summary as a non-final smoke run.bt eval --sample 20 --sample-seed 7 qa.eval.ts — run a deterministic random sample and clearly label the summary as a non-final smoke run.bt eval runs the full dataset and marks the summary as final.bt sql--non-interactive is set, or when a query argument is provided.FROM clause against a Braintrust table function (for example project_logs(...)).bt sql "SELECT id FROM project_logs('<PROJECT_ID>') LIMIT 1"echo "SELECT id FROM project_logs('<PROJECT_ID>') LIMIT 1" | bt sqlOFFSET '<CURSOR_TOKEN>'.WHERE; use HAVING only after aggregation.https://www.braintrust.dev/docs/reference/sqlbt viewbt view logsbt view logs --object-ref project_logs:<project-id>bt view logs --list-mode spans (one row per span)bt view trace --object-ref project_logs:<project-id> --trace-id <root-span-id>bt view trace --url <braintrust-trace-url>bt view span --object-ref project_logs:<project-id> --id <row-id>--limit <N>: max rows per request/page--cursor <CURSOR>: continue pagination explicitly--preview-length <N>: truncation length for non-single-span fetches--print-queries: print SQL/invoke payloads before execution-j, --json: machine-readable envelope outputlogs filter flags:
--search <TEXT>--filter <EXPR>--window <DURATION> (default 1h)--since <TIMESTAMP> (overrides --window)bt view logs TUI):
Up/Down to select, Enter to open trace, r to refresh/ edit, Enter apply, Esc cancel, Ctrl+u clearCtrl+k, then Entert span/thread, Left/Right switch panes, Backspace/Esc backq quitbt authbt auth loginOAuth (browser) (default) or API key.bt uses a searchable picker (alphabetized) and lets you choose a specific org or no default org (cross-org mode).bt confirms the resolved API URL before saving.bt auth login --oauth --profile work--no-browser to print the URL without auto-opening.bt auth profilesbt auth logoutbt auth logout --force (skip confirmation)bt auth statusbt auth refresh --profile workAuth resolution order for commands is:
--profile--api-key or BRAINTRUST_API_KEY (unless --prefer-profile is set)BRAINTRUST_PROFILE--org/config org)On Linux, secure storage uses secret-tool (libsecret) with a running Secret Service daemon. On macOS, it uses the security keychain utility. If a secure store is unavailable, bt falls back to a plaintext secrets file with 0600 permissions.
bt setup and bt docsUse setup/docs commands to configure coding-agent skills and workflow docs for Braintrust.
bt setup --localbt setup --globalbt setup skills --local --agent claude --agent codexbt setup instrument --agent codexbt setup instrument --agent claude --agent-cmd '<your claude command>'bt setup mcp --local --agent claude --agent codexbt setup mcp --global --yesbt setup doctorbt setup doctor --localbt setup doctor --globalbt setup skills --local --workflow instrument --workflow evaluatebt setup skills --local --no-fetch-docsbt setup skills --local --refresh-docsbt setup skills --global --yesllms.txt):
bt docs fetch --workflow instrument --workflow evaluatebt docs fetch --refresh (clear output dir first to avoid stale pages)bt docs fetch --dry-runbt docs fetch --strict (fail if any page download fails)Current behavior:
claude, codex, copilot, cursor, gemini, opencode, qwen.--agent values are provided, bt auto-detects likely agents from local/global context and falls back to all supported agents when none are detected.bt setup opens a top-level setup wizard with: instrument, skills, mcp, and doctor.bt setup instrument always targets the local git repo, reuses the skills setup flow, and guarantees instrument docs are included.bt setup instrument always includes instrument and lets you multi-select additional docs for observe and/or evaluate.bt setup instrument defaults to codex when no agent is specified; pass --agent-cmd for agents without a built-in default command.Esc to go back to the previous step.--workflow is omitted in non-interactive mode, setup defaults to all workflows.--refresh-docs in setup (or bt docs fetch --refresh) to clear old docs before re-fetching.cursor is local-only in this flow. If selected with --global, bt prints a warning and continues installing the other selected agents..claude/skills/braintrust/SKILL.md..gemini/skills/.qwen/skills to .agents/skills/braintrust/SKILL.md..copilot/skills to .agents/skills/braintrust/SKILL.md. MCP config is written via copilot mcp add to the project .copilot dir (local) or the default user config (global)..cursor/rules/braintrust.mdc with the same shared Braintrust guidance plus an auto-generated command-reference excerpt from this README..bt/skills/docs for --local and ~/.config/bt/skills/docs (or $XDG_CONFIG_HOME/bt/skills/docs) for --global..bt/skills/docs/README.md and per-section .bt/skills/docs/<section>/_index.md (or the global equivalents under ~/.config/bt/skills/docs)..bt/skills/docs/reference/sql.md (or ~/.config/bt/skills/docs/reference/sql.md for global setup).Skill smoke-test harness:
scripts/skill-smoke-test.sh --agent codex --bt-bin ./target/debug/btAGENT_TASK.md, and verifies that post-agent changes include both tracing and an eval file.bt --help and <subcommand> --help (for example bt sql --help, bt view --help)..bt/skills/docs/README.md (local setup) or ~/.config/bt/skills/docs/README.md (global setup), then section indexes like .bt/skills/docs/evaluate/_index.md..bt/skills/docs/reference/sql.md (or ~/.config/bt/skills/docs/reference/sql.md for global setup).bt docs fetch (optionally with --refresh).