Open source · MIT license

Your AI CLI,
as an OpenAI API

Bridge Claude Code, Gemini, Codex, or GitHub Copilot into any app that speaks the OpenAI format. No API keys. No extra billing.

$ npm install -g bridgerapi

Then run bridgerapi for the interactive setup wizard

One bridge, any backend

bridgerapi runs locally and translates between the OpenAI API format and whichever CLI you have logged in.

Your app
Goose, Cursor, Open WebUI…
POST /v1/chat/completions
to http://127.0.0.1:8082
bridgerapi
local HTTP server
Converts messages → prompt
Routes by model prefix
CLI subprocess
claude / gemini / codex / gh
Uses your existing OAuth session
Streams output back as SSE

One command to get started

Run bridgerapi and the wizard handles everything.

$ bridgerapi
 
bridgerapi — OpenAI-compatible API bridge for AI CLI tools
─────────────────────────────────────────────────────────
 
Backends detected:
 
claude
gemini
codex
→ codex auth (Codex CLI — npm i -g @openai/codex)
copilot
→ gh auth login (GitHub Copilot — gh extension install ...)
 
Port [8082]:
 
1 Foreground
2 Background service (auto-starts on login)
 
Choose [1/2]: 2
 
bridgerapi is running
 
Base URL : http://127.0.0.1:8082/v1
API Key : local

Works with the CLIs you already have

bridgerapi detects whichever CLIs are installed and routes requests automatically.

Claude Code
Models: claude-*
claude login
Gemini CLI
Models: gemini-*
gemini auth
Codex CLI
Models: gpt-*, o3, o4
codex auth
GitHub Copilot
Models: copilot
gh auth login
Droid (Factory.ai)
Models: glm-*, kimi-*, minimax-*
export FACTORY_API_KEY=fk-...

Point any app at it

Anything that supports OpenAI-compatible endpoints works out of the box.

Goose

GOOSE_PROVIDER: openai
GOOSE_MODEL: claude-sonnet-4-6
OPENAI_HOST: http://127.0.0.1:8082

Continue (VS Code)

{
  "provider": "openai",
  "apiBase": "http://127.0.0.1:8082/v1",
  "apiKey": "local"
}

Open WebUI

OpenAI API Base URL:
http://127.0.0.1:8082/v1

API Key: local

Any OpenAI SDK

import OpenAI from 'openai'

const client = new OpenAI({
  baseURL: 'http://127.0.0.1:8082/v1',
  apiKey: 'local'
})