Skip to content

About

A local API cupboard for your laptop. Store all API keys once in the OS keychain and use them in any project through env injection or a localhost proxy. No .env files. Go, single binary, Windows and Linux.

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

API Cupboard logo

API Cupboard

A local API cupboard for your laptop.
Store your API keys once. Use them in every project. Keep them out of your repos.

License: MIT Platforms Status


Status: In development. The commands and features below are the planned design for v1.0.0. See docs/project-plan.md.

Why

You copy the same OpenAI, Stripe or GitHub keys into .env files in many projects. Each copy is a chance to commit a secret by mistake. When a key changes, you must update every copy.

API Cupboard keeps each key in one place: your OS keychain. Your projects get the keys only when they run.

Features

  • One store for all keys. Keys stay in Windows Credential Manager or Linux Secret Service, not in plaintext files.
  • Inject mode. cupboard run -- <command> starts your command with the keys as environment variables.
  • Proxy mode. Your app calls 127.0.0.1:9090/<shelf>/.... The proxy adds the key and forwards the request. Your app never sees the key.
  • Streaming support. Server-sent events (for example, LLM streaming) pass through the proxy.
  • Web UI. Add, edit and delete keys, and see a log of recent requests. One click on the desktop icon opens it in your browser.
  • Single binary. Written in Go. No runtime to install.
  • Local only. No account, no cloud, no telemetry.

How it works

flowchart LR
    subgraph Inject mode
        A[You run<br/>cupboard run -- cmd] --> B[cupboard run<br/>reads cupboard.toml]
        B --> C[Your app process<br/>keys as env vars]
    end
    UI[Web UI] -- writes --> K[(OS keychain)]
    K -- key --> B
    K -- key --> E
    subgraph Proxy mode
        D[Your app<br/>calls 127.0.0.1:9090] --> E[cupboard serve<br/>checks Host, adds key]
        E --> F[Upstream API<br/>https only]
    end
Loading

Quick start (planned)

1. Add a key

cupboard add openai
# Prompts for the key and the upstream URL, for example https://api.openai.com

2a. Use inject mode

Add a cupboard.toml file to your project. It contains no secrets, so you can commit it.

[env]
OPENAI_API_KEY = "openai"
STRIPE_SECRET_KEY = "stripe"

Run your project through the cupboard:

cupboard run -- npm run dev

2b. Use proxy mode

Start the proxy:

cupboard serve

Point your SDK at the cupboard. Most SDKs need a key value, so give a dummy value:

from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:9090/openai/v1", api_key="unused")

The proxy removes the dummy key and adds the real key. Streaming works through the proxy, and each token arrives as soon as the upstream sends it:

stream = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Count from 1 to 10."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices:
        print(chunk.choices[0].delta.content or "", end="", flush=True)
print()

The proxy refuses calls from web pages (requests with an Origin header) with 403. If a page of your own must call a shelf, add its origin to the shelf's allow_origins list in shelves.json, for example "allow_origins": ["http://localhost:3000"].

3. Open the UI

Click the API Cupboard icon. If the cupboard is not running, the icon starts it. Then it opens the UI in your browser.

Commands (planned)

Command Description
cupboard add <shelf> Add a key and its upstream settings
cupboard list Show all shelves (never shows key values)
cupboard remove <shelf> Delete a shelf and its key
cupboard run -- <cmd> Run a command with keys as env vars
cupboard serve Start the proxy and the web UI

Security

  • Keys are stored in the OS keychain.
  • The proxy and UI listen only on 127.0.0.1.
  • The proxy rejects unknown Host headers and browser requests, to stop DNS rebinding and malicious websites.
  • The UI needs a session token, and a change to an upstream URL needs a confirm step.
  • Keys go only to https:// upstreams and never appear in logs.

Known limit: any program that runs as your user account can call the proxy or cupboard run. API Cupboard protects your keys from your repos, logs and network. It does not protect them from malware on your machine.

To report a vulnerability, read SECURITY.md.

Platform notes

  • Windows 11: a shortcut with the icon goes on the desktop and in the Start menu.
  • Linux: a .desktop file puts the icon in your app launcher. A Secret Service provider (gnome-keyring or kwallet) must be running.

Out of scope

Tray app, key rotation, rate limits, signed-request APIs (AWS SigV4, HMAC), macOS support and sync between machines.

Contributing

Read CONTRIBUTING.md. To claim an issue or ask a question, join the PulseEngine Discord.

License

MIT © 2026 PulseEngine

About

A local API cupboard for your laptop. Store all API keys once in the OS keychain and use them in any project through env injection or a localhost proxy. No .env files. Go, single binary, Windows and Linux.

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages