A high-performance reverse proxy for intercepting AI coding assistant CLI traffic, with a real-time Next.js dashboard for observability.
Supported CLIs:
- Claude Code → Anthropic API
- Codex CLI → OpenAI API
Claude Code CLI → Go Proxy (localhost:8080) → api.anthropic.com
Codex CLI → ↓ → api.openai.com
WebSocket broadcast
↓
Next.js Dashboard (localhost:3000)
The proxy auto-detects the provider based on request headers.
cd proxy
go mod tidy
go run .The proxy listens on:
:8080- HTTP proxy endpoint:8081- WebSocket server for dashboard
cd dashboard
npm install
npm run devDashboard available at http://localhost:3000
For Claude Code:
export ANTHROPIC_BASE_URL=http://localhost:8080
claudeFor Codex CLI:
Important: Codex must be logged in with an API key, not ChatGPT OAuth. ChatGPT OAuth won't work through the proxy due to how
OPENAI_BASE_URLchanges Codex's behavior.
# First, log in with an API key (one-time setup)
codex logout # if currently logged in via ChatGPT
codex login --api-key
# Then set the proxy URL and run
export OPENAI_BASE_URL=http://localhost:8080
codexYou can run both CLIs simultaneously - the proxy auto-detects the provider based on request headers.
- Real-time streaming: Watch SSE events as they arrive
- Request/Response inspection: View headers, body, and parsed JSON
- Token tracking: Monitor input/output token usage per request
- Dark theme: Easy on the eyes during long sessions
- Auto-reconnect: Dashboard reconnects automatically if proxy restarts
damascus/
├── proxy/ # Go reverse proxy
│ ├── main.go # Entry point
│ ├── proxy.go # Reverse proxy logic
│ ├── sse.go # SSE stream parser
│ ├── store.go # In-memory request storage
│ ├── websocket.go # WebSocket server
│ └── types.go # Shared types
├── dashboard/ # Next.js dashboard
│ └── src/app/
│ ├── page.tsx # Main dashboard
│ ├── components/ # UI components
│ └── hooks/ # WebSocket hook
└── README.md
- API keys are automatically redacted in the dashboard
- The proxy only stores requests in memory (clears on restart)
- WebSocket accepts connections from any origin (development mode)