secrets
Summary: what secrets is, what it is for, what it is not for, and where to start.
Key terms: end-to-end encryption, project, environment, machine device, project log, secrets-chad.
Related: Concepts · Map · Recipes
secrets is a self-hosted secrets manager for projects and the people and machines that run them. Clients (the
secrets-chad CLI and the web app) encrypt and decrypt every secret name and value; the server stores ciphertext,
checks signatures and enforces the rules. Access to a project is defined by a hash-chained log that project owners sign,
so the server cannot add a reader on its own. People sign in with passkeys, and servers, CI jobs and coding agents use
device keys with access to the environments an owner granted.
The picture as text
flowchart LR
P[Person: browser or CLI] -->|ciphertext, signatures| S
M[Machine: server, CI, agent] -->|ciphertext, signatures| S
S[Server:<br/>stores, checks] --> D[(SQLite or PostgreSQL:<br/>no plaintext)]
W[Web app: static files<br/>on a separate host] -.->|loaded by| P
What it is for
| You want | secrets gives |
|---|---|
| Programs that get environment variables at start | secrets-chad run -- CMD sets them for one process; no file on disk |
A .env or JSON file for a deploy | secrets-chad export --out FILE, with an atomic write and an optional merge into an existing file |
| CI jobs with access to one environment | A machine device with a read grant, stored as one GitHub secret |
| A small team that shares projects | Owners, writers and readers per project; sharing by handle with fingerprint checks |
| Coding agents that use secrets without seeing them | run masks values in the output; get and export to the terminal are refused for agents |
| A host you do not fully trust | The server, its backups and any proxy or CDN see only ciphertext and metadata |
| A small deployment | One Rust binary, SQLite or PostgreSQL, and a static web app |
What it is not for
| Not for | Reason |
|---|---|
| Credentials that the server creates or rotates (database users, cloud tokens) | The server would need admin rights at the other system and would see each credential |
| Large files or binary data | Values are UTF-8 text of at most 64 KiB |
| A personal password vault | There are no browser autofill, TOTP or item types |
| Hiding project names, environment names, members or sizes from the server | The server needs this metadata to enforce the rules; see what the server sees |
| Different roles for one person in each environment | A member has one role in the whole project. Machines get grants per environment |
| High availability or federation | One server process per database; an account belongs to one server |
A feature that needs the server to read a secret does not belong in secrets.
Where to start
| You are | Read |
|---|---|
| New to the project | Concepts: the model and the vocabulary |
| Using the CLI or setting up CI | Recipes, starting with start |
| Running a server | Operation and the self-host recipe |
| Changing secrets | Map, Data, Flows, Interfaces, then the spec |
| A coding agent that uses secrets | The agent skill, or secrets-chad agent |
| A coding agent that changes this repository | INDEX.md, then AGENTS.md |
| Reviewing the security | Spec §3, threat model and Flows |
Getting started
secrets-chad login --host secrets.example.com # approve this device in the browser
secrets-chad project create shop/dev
secrets-chad -e shop/dev init # writes .secrets.toml; it holds IDs only
printf %s "$VALUE" | secrets-chad set DATABASE_URL
secrets-chad run -- ./server
- Status: before a first release. The server, the CLI and the web app work and are tested. No external security review has happened yet.
- Accounts: passkeys, sessions, devices and recovery come from
auth-chad, mounted at
/v1/auth. - Exact rules: the spec is the contract. Where this wiki and the spec differ, the spec is correct.
- Decisions and their reasons: decisions.
- MIT license.