OneCLI

The secret vault for AI agents.

Store once. Inject anywhere. Agents never see the keys.

Website ·

Docs ·

Discord

Website

Docs

Discord

How OneCLI works

What is OneCLI?

OneCLI is an open-source gateway that sits between your AI agents and the services they call. Instead of baking API keys into every agent, you store credentials once in OneCLI and the gateway injects them transparently. Agents never see the secrets.

Why we built it: AI agents need to call dozens of APIs, but giving each agent raw credentials is a security risk. OneCLI solves this with a single gateway that handles auth, so you get one place to manage access, rotate keys, and see what every agent is doing.

How it works: You store your real API credentials in OneCLI and give your agents placeholder keys (e.g. FAKE_KEY). When an agent makes an HTTP call through the gateway, the OneCLI gateway matches the request to the right credentials, swaps the FAKE_KEY for the REAL_KEY, decrypts them, and injects them into the outbound request. The agent never touches the real secrets. It just makes normal HTTP calls and the gateway handles the swap.

Architecture

OneCLI Architecture

Rust Gateway: fast HTTP gateway that intercepts outbound requests and injects credentials. Agents authenticate with access tokens via Proxy-Authorization headers.

Rust Gateway

Web Dashboard: Next.js app for managing agents, secrets, and permissions. Provides the API the gateway uses to resolve which credentials to inject for each request.

Web Dashboard

Secret Store: AES-256-GCM encrypted credential storage. Secrets are decrypted only at request time, matched by host and path patterns, and injected by the gateway as headers or URL query parameters.

Quick Start

The fastest way to run OneCLI locally:

Or, if you prefer to run it manually:

Open http://localhost:10254, create an agent, add your secrets, and point your agent's HTTP gateway to localhost:10255.

http://localhost:10254

The Quick Start runs OneCLI in local mode (single-user, no login), so no .env or NEXTAUTH_SECRET is required. To enable Google OAuth for multiple users, set NEXTAUTH_SECRET and the Google credentials (see Configuration).

Configuration

Features

Transparent credential injection: agents make normal HTTP calls, the gateway handles auth

Encrypted secret storage: AES-256-GCM encryption at rest, decrypted only at request time

Host & path matching: route secrets to the right API endpoints with pattern matching

Multi-agent support: each agent gets its own access token with scoped permissions

Easy setup: curl -fsSL https://onecli.sh/install | sh starts everything (app + PostgreSQL)

Two auth modes: single-user (no login) for local use, or Google OAuth for teams

Rust gateway: fast, memory-safe HTTP gateway with MITM interception for HTTPS

Vault integration: connect Bitwarden (or other password managers) for on-demand credential injection without storing secrets on the server

Vault integration

Project Structure

Local Development

Prerequisites

mise (installs Node.js, pnpm, and other tools)

mise

Rust (for the gateway)

Docker (for PostgreSQL)

Setup

Dashboard at http://localhost:10254, gateway at http://localhost:10255.

http://localhost:10254

http://localhost:10255

Commands

Configuration

All environment variables are optional for local development:

Contributing

We welcome contributions! Please read our Contributing Guide and Code of Conduct before getting started.

Contributing Guide

Code of Conduct

License

Apache-2.0

Apache-2.0