This walkthrough uses the CLI, because that's where most keys end up being used. Every step can also be done in the desktop, phone or web app.
1. Create your vault
fishmem init --name my-laptopThis generates a new master key on this computer and protects it with the system keychain (macOS Keychain, Windows Credential Manager or the Secret Service on Linux). On a server without a keychain, add --passphrase to protect it with a passphrase instead.
Then sign in, so the vault belongs to your account, and make the recovery code for your Emergency Kit (it starts with FMR1- and is shown only once). Write it down and keep it somewhere offline:
fishmem login
fishmem recovery-codeWithout another device or a passkey, the recovery code, together with your account, is the only way back into your vault. It isn't your master key: it opens a sealed copy that our server keeps but can't read.
fishmem recovery-codemakes a new one any time, and the old one stops working. The apps and the web app save it as an Emergency Kit, a one-page PDF to print.
Already have a vault on your phone or another computer? Run fishmem link --name my-laptop instead of init and scan the QR code from the app. See Devices and recovery.
2. Create a vault and add secrets
A vault holds the secrets for one app or service, like one .env file: names are unique within it. Development and production are two vaults, such as my-app and my-app-prod. Every account also has a vault named Personal; on the Free plan it's the only one, so write Personal wherever this page says my-app.
fishmem secrets create my-app
fishmem secrets set OPENAI_API_KEY -p my-app # asks for the value, hidden
fishmem secrets set DATABASE_URL -p my-app
fishmem secrets ls -p my-appValues are never echoed to the terminal unless you ask with --reveal or fishmem secrets get.
Already have a .env file? Import it in one go:
fishmem secrets import .env -p my-app3. Tell the repository which vault it uses
echo '{"vault": "my-app"}' > .fishmem.json
git add .fishmem.json.fishmem.json contains no secrets, so it's safe to commit. Commands run inside the repository pick up the vault from it.
4. Run with secrets injected
fishmem run -- npm run devfishmem run decrypts the vault, sets every secret as an environment variable for that one process and its children, and runs the command. Nothing is written to disk, and your shell doesn't keep the values after the command exits.
Run against the production vault without editing anything:
fishmem run -p my-app-prod -- npm run build5. Delete the plaintext copies
Once the app runs from Fishmem, remove the old .env (or replace its values with fm:// references, see Vaults, references and run) and the export lines in your shell profile. Then add the pre-commit scan, so a key can't slip back into git:
fishmem scan --install-hookNext steps
- Move keys out of .zshrc, .env and notes, including imports from 1Password, Bitwarden, browsers, LastPass and KeePass, and exporting everything.
- Sign in and sync so the same secrets are on your phone, other computers and the dashboard. Sync is free on every plan.
- Use keys with AI agents.
- Give servers and CI their own read-only token.