kittors/CliRelay
Self-hosted AI gateway for coding CLIs — one OpenAI/Claude/Gemini/Codex-compatible endpoint, with a multi-tenant web console, request logs, and spend quotas.
What it solves
CliRelay is a unified proxy server designed to consolidate multiple AI CLI tool subscriptions and API keys into a single, managed API layer. It allows users to use their existing subscriptions (from providers like Claude, Gemini, and OpenAI) with any compatible client, while adding professional management features like routing, quotas, and multi-tenancy that are typically missing from raw API access.
How it works
The system acts as a gateway (defaulting to port 8317) between AI coding tools and upstream providers. It translates requests from various clients (e.g., Claude Code, Gemini CLI) into the appropriate format for the upstream service. It uses a production-grade stack consisting of Go, PostgreSQL for persistent data and request logs, and Redis for caching and rate limiting. A built-in web management panel allows administrators to configure provider channels, manage API keys, and monitor traffic in real-time.
Who it’s for
It is primarily for teams or individuals who manage multiple AI subscriptions across different providers and need a centralized way to distribute access, track usage, and ensure service availability through failover and load balancing.
Highlights
- Multi-Provider Support: Unified endpoint for Gemini, Claude, Codex, Qwen, xAI/Grok, Bedrock, and OpenAI-compatible services.
- Enterprise Governance: Multi-tenant architecture with fine-grained role-based access control (RBAC) and audit logs.
- Operational Tooling: Integrated web panel for monitoring, a TUI for terminal management, and a visual config editor.
- Traffic Management: Smart load balancing, automatic failover, and per-key token/request quotas.
- Observability: Full request/response capture in PostgreSQL with analytics dashboards and real-time system stats via WebSockets.
- Security: Native OAuth support for multiple providers and built-in content moderation profiles.
Related
- Project
- Project
- Project
- Project
- Project