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 acts as a centralized gateway for AI coding tools, allowing you to consolidate multiple AI subscriptions, API keys, and OAuth credentials into a single managed endpoint. It solves the problem of managing fragmented AI accounts by providing a unified interface that handles authentication, request routing, and usage monitoring for teams.
How it works
CliRelay functions as a proxy server that sits between your AI tools (like Claude Code or Gemini CLI) and your various provider accounts. When a request is made, the system authenticates the user, checks against defined quotas and rate limits, and routes the request to a healthy upstream account. It automatically handles protocol translation, performs failover if an account is exhausted or failing, and logs all usage data into a PostgreSQL database for detailed observability.
Who it’s for
This tool is designed for teams and power users who need to manage multiple AI coding subscriptions or API keys in one place. It is particularly useful for organizations that require multi-tenant support, fine-grained user permissions, audit logs, and centralized spend control.
Highlights
- Unified Endpoint: Routes requests from various AI coding tools through a single gateway, supporting OpenAI, Anthropic, Gemini, and many other providers.
- Resilient Routing: Features automatic failover, cooldowns, and multiple scheduling strategies (like round-robin) to ensure requests succeed even if specific accounts are struggling.
- Comprehensive Observability: Includes a web-based monitor center that tracks health scores, latency, token usage, and costs in real-time.
- Team Management: Supports multi-tenancy, role-based access control, and detailed audit trails for security-sensitive operations.
- Spend Control: Allows administrators to set daily, period, or lifetime quotas, as well as rate limits (RPM/TPM) per user or account.
Related
- Project
- Project
- Project
- Project
- Project