stash_

A tiny secrets store for AI agents. One 7 MB binary, one encrypted file.

GitHub →

Copy for LLM puts setup instructions on your clipboard. Paste them to your agent and it installs stash for you.

Quick start

go install github.com/FatherMarz/stash@latest

stash serve                        # prints your admin token, once
export STASH_TOKEN=stash_...
stash password set                 # the owner password, typed at a terminal
stash set OPENAI_API_KEY sk-...    # store a secret
stash get OPENAI_API_KEY           # read it back (asks for the owner password)
stash run -- python agent.py       # run anything with all secrets as env vars
stash ui                           # browse, search, and edit on one screen

Agents use secrets, they never see them

A token can list, write, run commands, and proxy. It cannot read a value. Reading a value needs the owner password, typed at a terminal. stash run gives the command its secrets and prints each value in its output as ****. A script that must read one raw value needs stash open NAME.

Give each agent its own token

stash token create my-agent --role ro
stash token rename my-agent builder
stash token revoke my-agent
stash audit                        # who read what, when

Roles: ro reads, rw reads and writes, admin manages everything, proxy reads nothing — see below.

Proxy mode: the agent never sees the key

stash route create openai --upstream https://api.openai.com --secret OPENAI_API_KEY
stash token create my-agent --role proxy

Point the SDK at http://127.0.0.1:8555/proxy/openai/v1 with the proxy token as its API key. stash puts the real key on each request on the way out. A proxy token cannot read any secret.

Notes