Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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 wantsecrets gives
Programs that get environment variables at startsecrets-chad run -- CMD sets them for one process; no file on disk
A .env or JSON file for a deploysecrets-chad export --out FILE, with an atomic write and an optional merge into an existing file
CI jobs with access to one environmentA machine device with a read grant, stored as one GitHub secret
A small team that shares projectsOwners, writers and readers per project; sharing by handle with fingerprint checks
Coding agents that use secrets without seeing themrun masks values in the output; get and export to the terminal are refused for agents
A host you do not fully trustThe server, its backups and any proxy or CDN see only ciphertext and metadata
A small deploymentOne Rust binary, SQLite or PostgreSQL, and a static web app

What it is not for

Not forReason
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 dataValues are UTF-8 text of at most 64 KiB
A personal password vaultThere are no browser autofill, TOTP or item types
Hiding project names, environment names, members or sizes from the serverThe server needs this metadata to enforce the rules; see what the server sees
Different roles for one person in each environmentA member has one role in the whole project. Machines get grants per environment
High availability or federationOne 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 areRead
New to the projectConcepts: the model and the vocabulary
Using the CLI or setting up CIRecipes, starting with start
Running a serverOperation and the self-host recipe
Changing secretsMap, Data, Flows, Interfaces, then the spec
A coding agent that uses secretsThe agent skill, or secrets-chad agent
A coding agent that changes this repositoryINDEX.md, then AGENTS.md
Reviewing the securitySpec §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.