logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·01.11.26
← Back to news

Show HN: OneCLI – OSS credential gateway that keeps secrets out of AI agents

Original article
github.com|22 points|12 comments|by Jonathanfishner|Jul 23, 2026

OneCLI: The Open-Source Secret Vault for AI Agents

OneCLI is an open-source credential gateway designed to act as a secure intermediary between your AI agents and the external services they interact with.

Instead of hardcoding sensitive API keys directly into every agent's configuration, you centralize your credentials within OneCLI. The gateway then handles the injection of these secrets transparently during runtime.

The Motivation: AI agents frequently require access to a vast array of APIs. However, distributing raw credentials to every agent creates a massive security vulnerability. OneCLI mitigates this by providing a single point of management for authentication, key rotation, and activity monitoring.

🛠 How It Works

The core mechanism involves replacing sensitive data with non-functional placeholders.

  1. Storage: You save your actual API keys in the OneCLI vault.
  2. Assignment: You provide your agents with a placeholder (e.g., FAKE_KEY).
  3. Interception: When an agent initiates an HTTP request through the gateway, OneCLI identifies the request.
  4. Injection: The gateway swaps the placeholder for the actual secret.

Mathematically, the transformation looks like this: Outbound Request(FAKE_KEY)→OneCLI GatewayOutbound Request(REAL_KEY)\text{Outbound Request}(\text{FAKE\_KEY}) \xrightarrow{\text{OneCLI Gateway}} \text{Outbound Request}(\text{REAL\_KEY})Outbound Request(FAKE_KEY)OneCLI Gateway​Outbound Request(REAL_KEY)

Request Flow


🏗 System Architecture

ComponentTechnologyPurpose
Rust GatewayRustA high-performance HTTP proxy that intercepts requests and injects credentials. Uses Proxy-Authorization headers for agent auth.
Web DashboardNext.jsThe management interface for configuring agents, secrets, and permissions. It serves as the API for the gateway.
Secret HandlingAES-256-GCMSecrets are encrypted at rest and only decrypted at the exact moment of the request.

🚀 Quick Start Guide

Option A: Automated Installation

Run the following command to get started immediately: curl -fsSL https://onecli.sh/install | sh

Option B: Manual Deployment

  • Clone the repository: git clone https://github.com/onecli/onecli.git
  • Enter directory: cd onecli
  • Launch via Docker: docker compose -f docker/docker-compose.yml up -d --wait

Post-Installation:

  1. Navigate to http://localhost:10254 to access the dashboard.
  2. Create your agent and input your secrets.
  3. Configure your agent to use http://localhost:10255 as its HTTP gateway.

Note: The Quick Start defaults to local mode (single-user, no login), meaning .env or NEXTAUTH_SECRET are not required. For team use, configure Google OAuth in the settings.


✨ Key Features

  • Transparent Injection: Agents perform standard HTTP calls; the gateway manages the authentication layer.
  • Secure Storage: Utilizes AES-256-GCM encryption for data at rest.
  • Granular Routing: Supports host and path pattern matching to ensure the right secret goes to the right endpoint.
  • Agent Isolation: Each agent is assigned a unique access token with specific scoped permissions.
  • Rapid Deployment: One-line install script for the full stack (App + PostgreSQL).
  • Flexible Auth: Choose between simple single-user mode or Google OAuth for organizational needs.
  • High Performance: The gateway is written in Rust for memory safety and speed, supporting MITM interception for HTTPS.
  • External Vaults: Integration with Bitwarden and other managers allows for on-demand injection without storing secrets on the OneCLI server.

📁 Project Organization

onecli/
├── apps/
│   ├── web/       # Next.js Dashboard & API (Port 10254)
│   └── gateway/   # Rust Credential Injector (Port 10255)
├── packages/
│   ├── db/        # Prisma ORM & Database Migrations
│   └── ui/        # Shared shadcn/ui components
├── docker/        # Dockerfile & Compose configurations
└── docs/          # Documentation

💻 Local Development

Prerequisites:

  • mise (for Node.js and pnpm management)
  • Rust toolchain
  • Docker (for the PostgreSQL instance)

Setup Sequence:

mise install
pnpm install
cp .env.example .env
pnpm db:generate
pnpm db:up        # Spin up PostgreSQL
pnpm db:migrate   # Apply schema changes
pnpm dev          # Launch web and gateway

Available Commands

CommandAction
pnpm devStarts the web app and gateway in development mode
pnpm buildCreates a production-ready build
pnpm checkRuns linting, type checks, and formatting
pnpm db:upStarts the PostgreSQL Docker container
pnpm db:downStops the PostgreSQL container
pnpm db:generateUpdates the Prisma client
pnpm db:migrateExecutes database migrations
pnpm db:studioLaunches the Prisma Studio GUI

⚙️ Configuration

All environment variables are optional for local development.

VariableDescriptionDefault
DATABASE_URLConnection string for PostgreSQLSee .env.example
NEXTAUTH_SECRETRequired for Google OAuth / Multi-userSingle-user mode
GOOGLE_CLIENT_IDOAuth Client ID—
GOOGLE_CLIENT_SECRETOAuth Client Secret—
SECRET_ENCRYPTION_KEYKey for AES-256-GCM encryptionAuto-generated

Contributing: We love community input! Please refer to our Code of Conduct and Contributing Guide.

License: Distributed under the Apache-2.0 license.

OneCLI Logo (Placeholder for project logo)