How automazeio/vibeproxy works
VibeProxy is a native macOS menu-bar controller for CLIProxyAPIPlus: users connect provider accounts, manage proxy settings and start the local service, then coding clients send requests through the proxy. The app monitors credentials and user configuration, composes effective configuration, and launches its bundled backend. A separate thinking proxy handles Claude thinking-model request adjustments and documented Amp login forwarding. The README also documents Vercel Gateway routing, multi-account behavior, provider controls, and live configuration reload. Some wiring is based on README documentation because the corresponding source excerpts are incomplete.
Main entry points: ServerManager.swift Server manager · SettingsView.swift Settings UI · AppDelegate.swift App lifecycle · ThinkingProxy.swift Thinking proxy
Components 24
Menu Bar App
- App entry
src/Sources/main.swift - App lifecycle
src/Sources/AppDelegate.swift - Settings UI
src/Sources/SettingsView.swift
Service Control
- Server manager
src/Sources/ServerManager.swift - CLIProxyAPIPlus
src/Sources/Resources/cli-proxy-api-plus - Config composer
src/Sources/ConfigComposer.swift - Bundled defaults
src/Sources/Resources/config.yaml - User overrides
- Config fingerprint
src/Sources/ConfigInputFingerprint.swift - Backend capabilities
src/Sources/BackendCapabilities.swift
Accounts And Providers
- Auth status
src/Sources/AuthStatus.swift - Connection actions
src/Sources/ServiceType+ConnectionAction.swift - Custom providers
src/Sources/CustomProviders.swift - Custom credentials
src/Sources/CustomProviderCredentialStore.swift - Z.AI key store
src/Sources/ZAIAPIKeyStore.swift - Auth files
Request Routing
- Thinking proxy
src/Sources/ThinkingProxy.swift - Tunnel manager
src/Sources/TunnelManager.swift
Other components
- Mac user
- AI provider services
- OAuth browser
- Coding clients
- Vercel AI Gateway
- Cloudflare tunnel
Connections 33
- Mac user → App entry: launches
- App entry → App lifecycle: instantiates
- App lifecycle → Settings UI: opens
- Mac user → Settings UI: configures
- Settings UI → Server manager: manages service
- Settings UI → Connection actions: selects action
- Settings UI → Auth status: shows accounts
- App lifecycle → Server manager: starts backend
- Server manager → CLIProxyAPIPlus: launches
- Server manager → Backend capabilities: probes flags
- Server manager → Config composer: composes config
- Config composer → Bundled defaults: reads defaults
- Config composer → User overrides: reads overrides
- App lifecycle → Config fingerprint: checks changes
- Server manager → Config fingerprint: checks inputs
- Settings UI → Custom credentials: manages keys
- Settings UI → Z.AI key store: adds API key
- Server manager → Custom credentials: loads credentials
- Server manager → Z.AI key store: loads keys
- Auth status → Auth files: reads and updates
- Server manager → Auth files: writes auth
- Server manager → OAuth browser: starts OAuth
- OAuth browser → AI provider services: authenticates
- Coding clients → Thinking proxy: sends requests
- Thinking proxy → CLIProxyAPIPlus: forwards requests
- Thinking proxy → AI provider services: forwards Amp login
- Thinking proxy → Vercel AI Gateway: routes Claude requests
- Server manager → Custom providers: configures providers
- Settings UI → Custom providers: manages providers
- App lifecycle → Thinking proxy: starts and stops
- Server manager → Tunnel manager: exposes local port
- Tunnel manager → Cloudflare tunnel: starts tunnel
- Cloudflare tunnel → Coding clients: provides public endpoint