Installation
Run the CLI from your project directory:$bitfab:setup.
Pass an initial setup request with --prompt (or -p) to send it straight to the agent:
codex login first.
For the experimental terminal-native flow, run
npx bitfab-cli init --v2 instead. It does not launch Codex: setup choices and tool permissions stay in the CLI while the Claude Agent SDK performs repository analysis and approved edits. Set ANTHROPIC_API_KEY or configure a supported Agent SDK cloud provider first. Use npx bitfab-cli setup --v2 instrument to run one setup mode, or add --diagram to print its declarative state graph without starting the agent.Manual installation (without the CLI)
Manual installation (without the CLI)
Set your API key as an environment variable:Then add this to
~/.codex/config.toml (global) or .codex/config.toml (project-level):What the Plugin Does
Automatic Setup
The$bitfab:setup skill runs a multi-phase workflow:
- Login — Opens your browser for OAuth authentication, saves credentials securely
- Explain — Walks through opt-out
withTrace/trace,withNode/node, supportedwithSpanfallbacks, and replay, including the five ways replay can change a method’s execution. Everything after this asks you to make per-method decisions, so it comes first - Approach — Asks whether the agent should walk you through instrumenting or hand you the docs so you can do it yourself
- Instrument + Replay (in parallel, per workflow) — Reads your codebase, finds all AI workflows (LLM calls, agents, AI-driven decisions), and presents them as a numbered list. You choose which to instrument, or name a file, function, or directory yourself and it reads only that instead of scanning. Either way it adds tracing with minimal diffs and creates a registry module for the replay command shipped with the SDK
MixedTracingError as a reason to stay opt-in. Before converting a shared helper, it checks every production caller so existing opt-in callers keep a separate surface; TypeScript node wrappers also use named functions as required by withNode. A TypeScript client that uses a dedicated organization or environment key also gates captureEnabled on that key being present, so an empty value cannot fall back to an unrelated BITFAB_API_KEY.
You can run individual phases:
Assistant (retired)
The$bitfab:assistant skill has been retired. Running it now only explains that it is gone. You don’t need a special command: tell your agent what you want, and it uses the Bitfab tools to do it. For example:
$bitfab:setup.
MCP Tools
The plugin registers MCP tools that Codex can call during conversations. These let you inspect traces, diagnose failures, and improve your code without leaving the terminal. If a tool call includes a parameter that the installed plugin does not support, Bitfab ignores only that parameter and continues the call with the supported ones. The result includes a warning that names each ignored parameter and the receiving plugin version. Update the plugin before relying on those parameters.Core
Trace Inspection
Verdicts and Datasets
Experiments
Templates
Instrumentation
Skills
Example Workflows
Instrument a new project
Diagnose and fix a failing function
Ask Codex naturally:search_traces and get_traces to inspect failing traces and suggests code fixes directly.
Replay after a code change
After updating a function, pass your registry module to the replay command installed by the SDK:Configuration
Credentials
Credentials are stored in.bitfab/credentials.local.json when that project-local file exists, otherwise in ~/.config/bitfab/credentials.json (created by $bitfab:setup login with owner-readable permissions).
Environment Variables
Troubleshooting
Not authenticated
If you see “Not authenticated” on session start:- Run
$bitfab:setup loginto authenticate via browser - Check that
~/.config/bitfab/credentials.jsonexists and contains your API key - If using an environment variable, verify
BITFAB_API_KEYis set
MCP tools not available
If Codex can’t access the Bitfab tools:- Verify the MCP server configuration in
~/.codex/config.tomlor.codex/config.toml - Check that
BITFAB_API_KEYis set in your environment - Try restarting Codex
Plugin updates
Run$bitfab:update to install the latest version.