OneCLI Shields AI Agents From Leaking API Keys With a Credential Gateway
OneCLI is an open-source gateway that stores API keys once and injects them into agent requests at runtime, so agents never touch real credentials.
Takeaways
- OneCLI is an open-source credential gateway that keeps API keys away from AI agents.
- Agents use placeholder keys; the Rust gateway swaps in real ones per request.
- Secrets are stored AES-256-GCM encrypted and matched by host and path patterns.
- Ships with a Next.js dashboard, Postgres backend, and Docker Compose setup.
- Policy layer enforces hard blocks, rate limits, and human-approval gates outside the model.
- Apache-2.0 licensed, over 2,000 GitHub stars, backed by Y Combinator.
Giving an autonomous agent a raw OPENAI_API_KEY, a Stripe secret, and a GitHub token in the same environment has become one of the least examined risks in the current agent stack. OneCLI is a new open-source project that tries to fix this by putting a credential gateway between agents and the services they call, so the agent process never actually holds the secret it is using.
The repo is written in TypeScript and Rust, Apache-2.0 licensed, and has picked up over 2,000 stars since launch. The company behind it is Y Combinator backed and pitches the tool as the vault layer for a broader agent platform.
The placeholder key trick
OneCLI is an open-source gateway that sits between your AI agents and the services they call. Rather than baking API keys into every agent, you store credentials once in the gateway and it injects them transparently. The mechanism is straightforward: real credentials live in OneCLI, and your agents get placeholder keys like FAKE_KEY. When an agent makes an HTTP call through the gateway, OneCLI matches the request to the right credentials, decrypts them, swaps the placeholder for the real value, and forwards the outbound request. The agent never touches the actual secret.