← Open Source

OneCLI is an open-source vault for the keys your AI agents use.

InfrastructureGatewayMake world agent-readyTypeScript
Momentum
+0stars in 24 hours0.0%
3.67k
Stars
280
Forks
+10
This week
28
Contributors
Created 2026-03-08 · Updated 2026-12-04 · #8089 today
Top developers
README

OneCLI

OneCLI is an open-source vault for the keys your AI agents use.

Put your API keys, LLM keys and connected apps in a vault, then connect an agent to it. The agent keeps calling GitHub, Stripe or OpenAI exactly as it does today, and the OneCLI gateway attaches the right key on the way out. The agent never gets the key itself, so there's nothing for it to print, log or leak.

Note

Are you an agent? Run onecli status to check whether you're connected. If you aren't, run onecli connect and show your person the link and code it prints. They approve it, and you're connected.

The problem · How it works · Works with · Vaults · Permissions · For agents · Quick start · Security


The problem

Agents like Claude Code, Hermes and OpenClaw can't do much without your GitHub token, your Stripe key, your Gmail login and an LLM key. Those usually end up pasted into a .env file, a prompt or a sandbox config. That goes wrong in three ways.


Copied everywhere

Each agent gets its own copy. Ask which agent used which key last week, and nobody knows.


Never rotated

To change a key you'd have to hunt down every copy first. So the old one stays.


One injection away

A single prompt injection can get an agent to print a key, or post it somewhere it shouldn't.


How it works

1. Make a vault and put things in it

Each thing is an item: a connected app, an API key or an LLM key. The value is encrypted when you save it and nobody sees it again, you included.

2. Connect an agent

Paste this prompt into the coding agent you already use, such as Claude Code or Codex, then approve its sign-in in your browser:

Tip

Use curl to read https://onecli.sh/docs/quickstart.md, then follow it to set up OneCLI for me.

Or run curl -fsSL https://onecli.sh/start | sh in a terminal. It installs the CLI, signs you in and offers to start a coding agent it finds, with the same prompt.

That agent becomes your manager: it signs in as you and connects your other agents where they run. It never connects itself, so its own settings stay as they are. To connect another agent later, click Connect an agent on the vault's page and give the prompt it shows to your manager, or run onecli connect where the new agent runs and approve the link and code it prints. The new agent can run in an E2B or Daytona sandbox, in Docker, on a server of your own or on your own computer.

Each place you connect becomes one named agent with its own credential. The agent shows up on the vault's page, and you can disconnect it whenever you like.

3. Leave the agent alone

It keeps making API calls the way it always did. The gateway looks up the vault's permission for that call, attaches the key and passes the request along. A key only ever goes to the host its item was made for.


Works with

  • Agents: Claude Code, Codex, Cursor, Hermes, OpenClaw, OpenCode, or one you wrote yourself. If it runs in a sandbox, in Docker, on a Linux server or on a Mac, it can connect. On Windows, use WSL.
  • Connected apps: GitHub, GitLab, Gmail, Google Drive, Google Calendar, Linear, Notion, Jira, Salesforce, HubSpot, Sentry, Datadog and more, about 75 apps in all. Most of them sign in with OAuth, so there's no key to copy. On a self-hosted install, those need your own OAuth app first, which you add in Settings.
  • API keys and LLM keys: Stripe, OpenAI, Anthropic, and anything else that takes a key. Postgres too.
  • Password managers: a vault can also fetch keys on demand from Bitwarden or 1Password, so they're never stored in OneCLI.

Vaults are the boundary

A vault is a box of items with some agents plugged into it. What an agent can reach comes down to three rules:

  • One agent, one vault. An agent can use everything in its vault and nothing else. If you connect a place that already holds an agent on another vault, it refuses. To really move the agent, connect again with --replace.
  • One item, one vault. Items aren't shared between vaults. When two vaults need the same key, put a copy in each.
  • No per-agent rules. Two agents on the same vault can do exactly the same things. If one of them should have less access, give it a smaller vault.

Permissions and approvals

Permissions live on the item, one tool at a time, and they apply to every agent on that vault.

Setting What happens to the request
🟢 Always allow The gateway attaches the key and sends the request.
🟡 Needs approval The request waits, for up to 3 minutes, until someone who can use the vault approves or denies it. If nobody answers, it isn't sent.
🔴 Never Blocked.

Every new item starts as always allow: each tool of a connected app, and every API key and LLM key. An agent can use it right away. To make an action wait for a person, or to block it, change that tool's setting on the item.


What the agent sees

An agent can ask what's in its vault. It gets back names, hosts, permissions and state. There is no command that returns a value.

# Is this agent connected, and to which vault?
onecli status

# The items it can use
onecli items

# Would this call be allowed?
onecli check POST https://api.github.com/repos/acme/app/issues

# Run one command through the gateway
onecli exec -- gh issue create --title "Flaky test"

# Missing something? Ask your person to add it
onecli request stripe

onecli exec works on an agent that's already running. To make it permanent, onecli attach writes the OneCLI skill and proxy settings into the agent's own config, and they apply from its next start.

The commands come from the OneCLI CLI: curl -fsSL onecli.sh/cli/install | sh. There are SDKs for Node.js and Python as well.


Quick start

OneCLI Cloud

Sign up at onecli.sh and you're done. There's nothing to install.

You get 5,000 credits a month at no cost. You spend one credit each time OneCLI adds a credential to a request. Blocked requests cost nothing.

Self-hosted

git clone https://github.com/onecli/onecli.git && cd onecli
pnpm install
pnpm run setup

Setup runs the stack in Docker and prints its address when it finishes: http://localhost:10254 on macOS and Windows, the Docker bridge address (usually http://172.17.0.1:10254) on Linux. Open it, create your account and paste the prompt the dashboard shows into your coding agent. It includes your install's address.

On Kubernetes, use the Helm chart: helm install onecli oci://ghcr.io/onecli/charts/onecli. The self-hosting guide walks through both.


Open source and OneCLI Cloud

Everything in this repository is Apache-2.0, and it's the whole product for one person: as many vaults, items and agents as you want, plus the gateway, the dashboard, the API and the CLI.

A team needs more than that: other people, vaults they share, single sign-on. That part is OneCLI Cloud, which we host.

Open source OneCLI Cloud
Vaults, items, agents, permissions and approvals ✅ ✅
Hosting You OneCLI
Members, invites and roles ➖ ✅
Vaults shared with chosen people ➖ ✅
Shared items: keys and apps an admin shares with chosen vaults ➖ ✅
Single sign-on, groups and user provisioning ➖ ✅

Security

  • Encrypted at rest. Values are stored with AES-256-GCM and only decrypted at the moment a request needs them.
  • Write-only. You can put a value in. No API route gives one back, whether the caller is an agent, the dashboard or the CLI.
  • Encrypted in transit. On OneCLI Cloud the hop from the agent to the gateway is TLS as well. A self-hosted gateway takes agents over plain HTTP until you give it a certificate, so keep its port private.
  • Fails closed. When the gateway can't tell whether a request is allowed, it doesn't send it.
  • SOC 2 Type II. OneCLI Cloud has a SOC 2 Type II report. You can find it in the trust center.

Note

If you find a vulnerability, please report it through the Security Policy and not in a public issue.


How it is built

Part Built with What it does
Gateway Rust Sits between your agents and the internet. Checks every request against the vault's permissions and attaches the key.
API server TypeScript Vaults, items, agents, permissions and approvals, for the dashboard, the CLI and the SDKs.
Dashboard Next.js Where you create vaults, add items, connect agents and answer approvals.

Contributing

We'd love the help. Start with the Contributing Guide and the Code of Conduct. Contributions come in under the Apache License 2.0, and docs/development.md gets you a local setup.


License

Apache-2.0.


Agents use your keys. They never hold them.

Nearby in the ranking
Similar items

AI Rank for iPhone

Follow AI model rankings

Download on the App Store