
The secret vault for AI agents.
Store once. Inject anywhere. Agents never see the keys.

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 proxy 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 proxy handles the swap.
Proxy-Authorization headers.The fastest way to run OneCLI locally (no external database or config needed):
docker run --pull always -p 10254:10254 -p 10255:10255 -v onecli-data:/app/data ghcr.io/onecli/onecli
Open http://localhost:10254, create an agent, add your secrets, and point your agent's HTTP gateway to localhost:10255.
git clone https://github.com/onecli/onecli.git cd onecli/docker docker compose up
apps/
web/ # Next.js app (dashboard + API, port 10254)
proxy/ # Rust gateway (credential injection, port 10255)
packages/
db/ # Prisma ORM + migrations + PGlite
ui/ # Shared UI components (shadcn/ui)
docker/
Dockerfile # Single-container build (gateway + web + PGlite)
docker-compose.yml
mise install pnpm install cp .env.example .env pnpm db:generate pnpm db:init-dev pnpm dev
Dashboard at http://localhost:10254, gateway at http://localhost:10255.
| Command | Description |
|---|---|
pnpm dev |
Start web + gateway in dev mode |
pnpm build |
Production build |
pnpm check |
Lint + types + format |
pnpm db:generate |
Generate Prisma client |
pnpm db:migrate |
Run database migrations |
pnpm db:studio |
Open Prisma Studio |
All environment variables are optional for local development:
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Embedded PGlite |
NEXTAUTH_SECRET |
Enables Google OAuth (multi-user) | Single-user mode |
GOOGLE_CLIENT_ID |
Google OAuth client ID | — |
GOOGLE_CLIENT_SECRET |
Google OAuth client secret | — |
SECRET_ENCRYPTION_KEY |
AES-256-GCM encryption key | Auto-generated |
We welcome contributions! Please read our Contributing Guide and Code of Conduct before getting started.