A runtime-agnostic Braintrust prompt manager with one shared engine:
- Core engine:
skills/braintrust/bt_cli.py - Native shell/Codex entrypoint:
./braintrust - Native Claude entrypoint:
/braintrust(via Claude plugin adapter files)
Both runtimes call the same CLI logic.
Codex / plain shell: run./braintrust <command>Claude Code plugin: run/braintrust <command>Codex skill discovery:AGENTS.mdmaps thebraintrustskill toskills/braintrust/SKILL.md
If you keep Claude plugin files (plugin.json, .claude-plugin/*, commands/*, skills/*), they act as adapters around the same core CLI.
Add to .env (or export in shell):
BRAINTRUST_API_KEY=sk-your-api-key
BRAINTRUST_PROJECT_NAME=Your_Project_Name # optional default projectGet API key: braintrust.dev/app/settings/api-keys
pip install braintrustchmod +x ./braintrust
./braintrust --helpInstall in Claude Code:
claude plugin add github:benigeri/braintrust-claude-pluginOr add in .claude/settings.json:
{
"permissions": {
"allow": ["mcp", "Bash(python3 */bt_cli.py *)"]
},
"plugins": ["github:benigeri/braintrust-claude-plugin"]
}Then use /braintrust ... commands in Claude.
These commands are supported in both runtimes:
| Command | Shell/Codex | Claude |
|---|---|---|
list |
./braintrust list |
/braintrust list |
get |
./braintrust get --slug "x" |
/braintrust get --slug "x" |
invoke |
./braintrust invoke --slug "x" --input '{"q":"..."}' |
/braintrust invoke --slug "x" --input '{"q":"..."}' |
diff |
./braintrust diff --slug "x" --system "..." |
/braintrust diff --slug "x" --system "..." |
update |
./braintrust update --slug "x" --system "..." |
/braintrust update --slug "x" --system "..." |
test |
./braintrust test --slug "x" --input '{"q":"..."}' --system "..." --force |
/braintrust test --slug "x" --input '{"q":"..."}' --system "..." --force |
promote |
./braintrust promote --from "x-v2" --to "x" --force |
/braintrust promote --from "x-v2" --to "x" --force |
Extended commands also available: create, delete, generate.
The shared CLI fails fast with explicit guidance when:
BRAINTRUST_API_KEYis missing- a command requires project context and neither
--projectnorBRAINTRUST_PROJECT_NAMEis set
Moving from plugin-only workflow to shell/Codex workflow:
Run smoke checks:
./scripts/smoke.shClaude plugin files are retained for native Claude usage. They are compatibility adapters around the same CLI core, not a separate implementation.
MIT