Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.capy.sc/llms.txt

Use this file to discover all available pages before exploring further.

Synopsis

capy edit

Description

Opens a two-pane TUI for the current project and branch:
  • Left pane lists every variable known to the project (pinned ∪ local ∪ remote) with its key, an abc…xyz value snippet, drift status, and an updated label.
  • Right pane is an inspector for the selected row — the value (shown as a snippet by default; r reveals the full value; long values wrap), the row’s status, and which side last moved.
  • Top status row summarizes the active branch, total tracked variables, drift count, and conflict count.
Edits buffer in memory. Pressing Enter after typing a new value updates the in-memory buffer; nothing lands on disk until you commit. Choosing commit & push runs the same pipeline as the conflict-resolver’s “commit and push all local values” action: re-encrypts the merged local state, updates keep.lock pins, uploads ciphertext to the service, and bumps sync state.

Example

  capy edit: my-app (development)

  development         12 tracked              2 drift              0 conflicts
  active branch       shown as abc…xyz snip… changed local/remote all clear

  Variables                                              │  DATABASE_URL
  KEY              VALUE        STATUS         UPDATED   │
> DATABASE_URL     pos…dev      * local        local     │  status   * local
  API_KEY          sk_…wxy      * in sync      in sync   │  updated  local
  STRIPE_KEY       sk_…abc      * remote       remote    │
  …                                                      │  value
                                                         │  pos…dev

  ↑↓ navigate · r reveal · e edit · c commit & push (1) · q quit

Keys

In the variables list:
KeyWhat it does
/ Move the cursor
rReveal the full value of the selected row (toggle to hide)
eEdit the value of the selected row inline
cCommit & push all pending edits (only shown when dirty)
q or Ctrl-CQuit. If you have uncommitted edits, you’ll be prompted
While editing a value (after e):
KeyWhat it does
typingAppend to the in-memory buffer
BackspaceTrim the buffer
EnterBuffer the edit (still uncommitted on disk)
EscCancel without buffering
When quitting with uncommitted edits:
KeyWhat it does
cCommit & push and exit
dDiscard pending edits and exit
k or EscKeep working — return to the TUI

Statuses

StatusMeaning
in syncPinned, local, and remote all match.
localLocal differs from pinned. Remote still matches pinned.
remoteRemote differs from pinned. Local still matches pinned.
conflictAll three sides differ. Resolve via capy.
unknownRemote couldn’t be reached — TUI is running with local-only data.

When to use capy edit vs editing .env directly

Both flows work. Pick whichever fits the moment:
  • capy edit — when you want to see what’s set, mask/reveal values without exposing them to your editor’s buffer, or change a single variable without thinking about encryption. Always commits and pushes in one step.
  • Edit .env directly — when you’re already in your editor adding a brand-new variable as plaintext, or rotating multiple values alongside code changes. Run capy afterward to encrypt and reconcile. See Editing secrets.

See also

  • Editing secrets — the two ways to change values, side by side
  • capy — full sync loop, reconciles drift after a direct .env edit
  • capy push — push local changes without pulling