What is Bifrost CLI?
bifrost and pick your agent, model, and go.
What it does for you:
- Automatically configures base URLs, API keys, and model settings for each agent
- Fetches available models from your Bifrost gateway’s
/v1/modelsendpoint - Installs missing agents via npm if needed
- Auto-attaches Bifrost’s MCP server to Claude Code for tool access
- Launches agents inside a persistent tabbed terminal UI so you can switch sessions without re-running the CLI
- Shows per-tab activity badges so you can tell when a session is progressing, idle, or has sent an alert
- Stores your selections securely (virtual keys go to your OS keyring, never plaintext on disk)
Installation
Bifrost CLI requires Node.js 18+ (for npx) and a running Bifrost gateway. See Gateway Setup if you haven’t started one yet.
Install a Specific Version
Quick Start
1. Start your Bifrost gateway
Make sure your Bifrost gateway is running. The default ishttp://localhost:8080:
2. Launch the CLI
In another terminal: To install
3. Walk through the setup
The CLI guides you through an interactive setup flow: Step 1 — Base URL Enter your Bifrost gateway URL. If you’re running locally, this is typicallyhttp://localhost:8080.
Step 2 — Virtual Key (optional)
If your Bifrost gateway has virtual key authentication enabled, enter your virtual key here. Otherwise, press Enter to skip.
Step 3 — Choose a Harness
Select which coding agent you want to launch. The CLI shows installation status and version for each:
| Harness | Binary | Provider Path | Notes |
|---|---|---|---|
| Claude Code | claude | /anthropic | MCP auto-attach, worktree support |
| Codex CLI | codex | /openai | Sets OPENAI_BASE_URL to {base}/openai/v1; model override via --model |
| Gemini CLI | gemini | /genai | Model override via --model flag |
| Opencode | opencode | /openai | Custom models configured automatically through generated OpenCode config |
| Key | Action |
|---|---|
Enter | Launch the harness |
u | Change base URL |
v | Change virtual key |
h | Change harness |
m | Change model |
w | Set worktree name (Claude Code only) |
d | Open Bifrost dashboard |
r | Open documentation |
l | Toggle harness exit logs |
i | Report an issue on GitHub |
s | Star the repo on GitHub |
q | Quit |
Tabbed Session UI
After launch, Bifrost CLI keeps you inside a tabbed terminal UI instead of exiting after the first session. The bottom tab bar shows:- The
Bifrost CLIlabel and current CLI version - One tab per running or recent agent session
- A status badge for each tab:
🧠— the visible screen is actively changing, so the agent is still working✅— the session looks idle and ready🔔— the PTY emitted a real terminal alert
Ctrl+B at any time to focus the tab bar. From tab mode you can:
| Key | Action |
|---|---|
n | Open a new tab and launch another agent session |
x | Close the current tab |
h / l | Move left or right across tabs |
1-9 | Jump directly to a tab |
Esc / Enter / Ctrl+B | Return to the active session |
Configuration
Config File
The CLI stores its configuration at~/.bifrost/config.json. This file is created automatically on first run and updated when you change settings through the TUI.
| Field | Description |
|---|---|
base_url | Your Bifrost gateway URL |
default_harness | Last used harness ID (claude, codex, gemini, opencode) |
default_model | Last used model identifier |
CLI Flags
| Flag | Description |
|---|---|
-config <path> | Path to a custom config.json file |
-no-resume | Skip resume flow and open fresh setup |
-worktree <name> | Create a git worktree for the session (Claude Code only) |
Using a Custom Config Path
Point the CLI to a project-specific config:Switching Harnesses and Models
The CLI handles all environment variables, API keys, and provider-specific configuration automatically — you never need to set them yourself. To change your setup, use the shortcut keys from the summary screen:| Key | Action |
|---|---|
h | Switch to a different harness (Claude Code, Codex, Gemini CLI, Opencode) |
m | Pick a different model from the gateway’s available models |
u | Change the Bifrost gateway URL |
v | Update your virtual key |
w | Set worktree name (Claude Code only) |
d | Open the Bifrost dashboard in your browser |
r | Open the CLI documentation |
l | Toggle harness exit logs |
i | Report an issue on GitHub |
s | Star the repo on GitHub |
Enter | Launch with current settings |
q | Quit |
Opencode Notes
Bifrost CLI applies two OpenCode-specific behaviors automatically:- Custom model selection: when you pick a model in Bifrost CLI, OpenCode is launched with the correct provider-qualified model reference and a generated OpenCode runtime config.
- Theme handling: if your OpenCode
tui.jsonalready defines a theme, Bifrost preserves it. If not, Bifrost supplies the adaptivesystemtheme so OpenCode does not fall back to its default dark-only appearance.
Session Flow
The CLI is designed for iterative development sessions:- Launch — Select your agent and model, press Enter
- Work — Use your agent as normal, all traffic routes through Bifrost
- Switch — Press
Ctrl+Bany time to open the tab bar and jump to another session or start a new one - Return — When an agent exits (or you quit it), the CLI returns to the chooser with your previous configuration intact
- Re-launch — Change model, switch harness, or re-launch the same setup instantly
bifrost, you’ll see the summary screen with your previous configuration ready to go. Press Enter to re-launch immediately, or adjust any setting.
Worktree Support
Worktree support is currently available for Claude Code only.
--worktree flag to Claude Code automatically.
MCP Integration
When launching Claude Code, the CLI automatically registers Bifrost’s MCP server endpoint (/mcp) so all your configured MCP tools are available inside the agent.
If a virtual key is configured, the CLI sets up authenticated MCP access with the correct Authorization header — no manual claude mcp add-json commands needed.
For other harnesses, the CLI prints the MCP server URL so you can configure it manually in your agent’s settings.
Troubleshooting
”npm not found in path”
The CLI needs npm to install harnesses. Make sure Node.js is installed:Agent not found after install
If a harness was installed but the binary still isn’t found, you may need to restart your terminal or add npm’s global bin directory to yourPATH:
Models not loading
If the model list doesn’t load, check that:- Your Bifrost gateway is running and accessible at the configured base URL
- You have at least one provider configured in Bifrost
- If using virtual keys, your key has permission to list models
Virtual key not persisting
The CLI stores virtual keys in your OS keyring. On Linux, ensuregnome-keyring or kwallet is running. If keyring access fails, the CLI will log a warning but continue working — the key will need to be re-entered next session.
Next Steps
Gateway Setup
Set up a Bifrost gateway if you haven’t already
Provider Configuration
Configure AI providers in your Bifrost gateway
Virtual Keys
Set up authentication and usage limits
MCP Gateway
Configure MCP tools for your agents

