There are two equally valid ways to change a secret in Capy. They land at the same place — encrypted ciphertext inDocumentation Index
Fetch the complete documentation index at: https://docs.capy.sc/llms.txt
Use this file to discover all available pages before exploring further.
.env and on the service — but they fit different moments.
Option 1 — capy edit (interactive TUI)
capy edit opens a two-pane inspector for the current project and branch:
- Reveal with
r— values display asabc…xyzsnippets by default; pressingrshows the full value of the selected row only. - Edit with
e— type the new value,Enterto buffer,Escto cancel. - Commit with
c— encrypts, updateskeep.lock, pushes to the service, and writes back to.envin one step. - Quit with
q— if you have uncommitted edits, you’ll be prompted to commit & push, discard, or keep working.
- See what’s currently set without opening your editor.
- Rotate one value with no risk of pasting plaintext into the wrong line.
- Avoid running a separate
capystep to encrypt and push.
capy edit reference page.
Option 2 — Edit .env directly
You can also just open .env in your editor, replace any capy:… snippet (or add a new line) with plaintext, save, and run capy:
capy picks up that DATABASE_URL and NEW_FLAG are now plaintext, encrypts them with the project key, updates keep.lock, and rewrites the file with capy:… snippets again. Plaintext values disappear from .env automatically on the next sync — they don’t linger on disk.
Reach for this when you want to:
- Add a brand-new variable.
- Rotate several values at once alongside code changes.
- Stay in the editor you already have open.
capy opens the conflict resolver so you can pick a side. See Syncing secrets.
Which one should I use?
There’s no wrong answer — they encrypt the same way and land at the same place. A rough split:| You want to… | Reach for |
|---|---|
| Skim or rotate a single existing value | capy edit |
| Add a brand-new variable | edit .env, then capy |
| Change values alongside code in your editor | edit .env, then capy |
| Avoid plaintext in your editor’s undo history | capy edit |
| Resolve a conflict between local and remote | capy (conflict resolver) |
What ends up on disk
In both flows:.envalways carriescapy:{resourceId}:{ciphertext}snippets after the operation completes — never plaintext.keep.lockadvances to a new pinned hash for the branch.- The service receives the new ciphertext and the updated manifest.
- A local cache of the encrypted blob is updated so
capy runworks offline.
What’s next
capy edit (CLI reference)
Every key the TUI listens to.
Syncing secrets
The conflict resolver and three-way diff.