casbin-gateway
See what every AI coding agent on your machine is doing, and whether the API behind it is the one you paid for. Claude Code, Codex, Cursor, Gemini CLI and more:
What is casbin-gateway?
See what every AI coding agent on your machine is doing, and whether the API behind it is the one you paid for. Claude Code, Codex, Cursor, Gemini CLI and more: one endpoint for 44 model vendors, A–F API authenticity grading, per-agent permissions, usage and prompt records.
Overview of casbin-gateway
What it is
Casbin Gateway is an open-source tool that monitors and manages AI coding agents on a local machine. It provides a single endpoint for 44 model vendors, grades API authenticity from A to F, and records per-agent usage, prompts, and tool calls. It supports agents such as Claude Code, Codex, Cursor, Gemini CLI, and others.
Key features
- Monitors every AI coding agent on the machine, including prompts, tool calls, and spend read from agents' own transcripts.
- Authenticity probes each provider independently and grades it A–F to detect resold or downgraded API keys.
- Provides one endpoint for 44 model vendors, with fallback to another vendor when one runs out or goes down.
- Enables per-agent permissions via a Casbin policy enforced on every relayed request.
- Allows installation, upgrade, and rollback of agents themselves from a single interface.
- Supports multiple instances of the same agent side by side (e.g., multiple Claude Desktop instances).
Use cases
- See what every AI coding agent on your machine is doing, including prompts and tool calls.
- Verify whether the API key behind an agent is the one you paid for, detecting cheaper models or fake cache hits.
- Manage multiple agents from one place: change API keys, base URLs, or provider settings across all agents at once.
- Keep agents running when a provider runs out of credit or hits a rate limit by automatically failing over to another provider.
Getting started
On Linux and macOS: bash curl -fsSL https://raw.githubusercontent.com/apache/casbin-gateway/master/scripts/install.sh | bash On Windows, in PowerShell: powershell irm https://raw.githubusercontent.com/apache/casbin-gateway/master/scripts/install.ps1 | iex The installation downloads the build, unpacks it into ~/.local/share/casbin-gateway (or %LOCALAPPDATA% on Windows), adds a casbin-gateway command to PATH, starts it, and sets it to start at login. The default admin credentials are admin / 123. The web interface is at http://localhost:17000.
License and pricing
Licensed under Apache-2.0. The project is open source with no stated pricing; it is free to use.
Based on the project's public README and repository metadata.