Tired of manually configuring API keys, and provider paths every time you launch a coding agent? Bifrost CLI solves this with a single command.
Launch Codex CLI (or Claude Code, Opencode) through your Bifrost gateway with no configuration. The CLI handles everything automatically: base URLs, API keys, model selection, and MCP integration.
👀 1. What is Bifrost CLI?
Bifrost CLI is an interactive terminal tool that connects your favorite coding agents to your Bifrost gateway. Instead of environment variables and config files, you just run a command and pick your agent, model, and go.
npx -y @maximhq/bifrost-cli
What it does for you:
- ✅ Automatically configures base URLs, API keys, and model settings
- ✅ Fetches available models from your Bifrost gateway
- ✅ Installs missing agents via npm if needed
- ✅ Auto-attaches Bifrost's MCP server for tool access
- ✅ Launches agents in a tabbed terminal UI
- ✅ Stores your selections securely in OS keyring
Supported agents:
- Claude Code (with MCP auto-attach)
- Codex CLI (OpenAI's coding agent)
- Gemini CLI (Google's agent)
- Opencode (Custom models support)
⚙️ 2. Getting Started in 3 Easy Steps
It takes only 5 minutes to use the CLI.
Step 1: Start Bifrost Gateway
Make sure your Bifrost gateway is running:
npx -y @maximhq/bifrost -p 8000
# Gateway starts at http://localhost:8000
Step 2: Launch Bifrost CLI
In another terminal:
npx -y @maximhq/bifrost-cli
Step 3: Follow the Interactive Setup
The CLI guides you through:
- Base URL — Enter your Bifrost gateway URL
- Virtual Key (optional) — If you have authentication enabled
- Choose Agent — Pick Codex, Claude Code, Gemini, or Opencode
- Select Model — Searchable list of available models from your gateway
- Review & Launch — Press Enter to start
That's it. Your agent launches with everything configured automatically.
🔎 3. How It Works: Configuration Magic
Bifrost CLI stores configuration automatically:
{
"base_url": "http://localhost:8000",
"default_harness": "codex",
"default_model": "openai/gpt-4o"
}
The magic:
- Base URL and API keys are fetched from your Bifrost gateway
- Your Codex CLI gets the correct provider path (
/openai) - Model selection happens from available models in the gateway
- Virtual keys are stored securely in OS keyring (never plaintext)
Switch agents anytime:
Press Ctrl+B to open the tab bar. Then:
h — Switch to different agent (Claude Code, Codex, Gemini, Opencode)
m — Pick different model
Enter — Launch
and more.
No environment variables. No config editing. Just shortcuts.
🔗 4. Tabbed Sessions & MCP Integration
After launch, you stay in a persistent tabbed terminal UI. Switch between sessions without re-running the CLI:
Ctrl+B — Open tab bar
n — New session
x — Close current tab
h/l — Navigate tabs
1-9 — Jump to specific tab
Status badges:
- Agent is working
- Session idle and ready
- Terminal alert
For Codex CLI specifically:
- MCP server auto-configured for Bifrost
- Access to all your configured tools through the gateway
- Automatic provider path routing (
/openai)
The session flow is seamless:
Launch → Work → Switch Sessions → Return → Re-launch
Your last selections are remembered. Next time you run bifrost, you'll see the summary screen with your previous configuration ready.
✅ 5. Advanced Features
Custom config path:
npx -y @maximhq/bifrost-cli -config ./my-project/bifrost.json
Useful for multiple Bifrost gateways or project-specific setups.
Available flags:
-config <path> # Custom config file location
-no-resume # Skip resume flow, start fresh setup
-worktree <name> # Create git worktree (Claude Code only)
Keyboard shortcuts during setup:
Enter — Launch with current settings
r — Open documentation
l — Toggle harness exit logs
and more.
Example: Launch with custom worktree
npx -y @maximhq/bifrost-cli -worktree feature-branch
This launches Claude Code in an isolated git worktree for parallel development.
📦 Installation & Requirements
Bifrost CLI requires:
- Node.js 18+ (for npx)
- A running Bifrost gateway
# First time
npx -y @maximhq/bifrost-cli
# If installed, just run
bifrost
💻 Results
Before Bifrost CLI:
- ❌ Set OPENAI_API_KEY manually
- ❌ Edit config files with provider paths
- ❌ Manage API keys in plaintext
- ❌ Switch agents = reconfigure everything
- ❌ No centralized model management
After Bifrost CLI:
- ✅ One command:
bifrost - ✅ Everything auto-configured
- ✅ Keys stored securely in OS keyring
- ✅ Switch agents with one shortcut
- ✅ Models fetched from gateway
- ✅ MCP integration automatic
- ✅ Persistent tabbed sessions
For Codex CLI users, this means instant access to OpenAI's powerful coding agent with Bifrost's routing, control, and MCP tools — all from one command.
🔎 Quick Reference
# Start Bifrost gateway
npx -y @maximhq/bifrost
# Launch CLI (in another terminal)
npx -y @maximhq/bifrost-cli
# Follow interactive setup
# Select: Codex CLI → Model → Launch
# Once running, use Ctrl+B to switch sessions
🖋 Conclusion
Bifrost CLI eliminates the friction of coding agent setup no more config files, or manual key management. One command
(npx -y @maximhq/bifrost-cli) launches your agent with everything automatically
configured and secure. Stop configuring, start building.
Resources:
- Bifrost GitHub: https://github.com/maximhq/bifrost
- Bifrost Docs: https://docs.getbifrost.ai

Top comments (3)
How do you like the new Bifrost CLI?
Interesting CLI
100%