capy org to switch which one you work in. The switch is written to disk, so it survives past the current shell.
capy org takes no arguments and no flags. It reuses your cached session (signing you in if there isn’t one), then shows an interactive list of every org you belong to. The org recorded in the current project’s keep.lock is marked as current, and the list ends with a Create new organization + entry. Pick the org you’re already on and Capy prints Already on <org> and stops.
After you pick a different org, Capy lists that org’s projects and asks you to choose one. In a directory that already holds a keep.lock, Capy rewrites that file with the new org and project, resets .capy/sync-state, and tells you to run capy to sync secrets.
If the org you pick has no projects yet, Capy offers to create the first one in the current directory. It refuses when the directory is already bound to another project and its .env holds encrypted values, because rebinding would make those values unreadable.
If you belong to an org but have no encryption key for it on this machine, capy org stops and tells you to run capy redeem <code> with an invite code from your org owner.
Both capy org and capy redeem are disabled in local-only mode, which has no organization, team, or server.
Per-project org binding
Each initialized Capy project (a directory with akeep.lock) is bound to one org - keep.lock records the org_id next to the project_id, so you don’t accidentally sync the wrong secrets into the wrong place.
Org-level commands read that same binding. Run capy invite, capy kick, or capy users inside a project directory and they act on the org named in keep.lock. Run capy invite or capy kick outside one and Capy prompts you to choose an org for that command; capy users needs a keep.lock and exits without one.
capy org is what changes the binding: picking a different org rewrites keep.lock in the current directory with the new org and project.
Redeeming an invite into a new org
If someone invites you to a new org, runningcapy redeem <code> will:
- Authenticate you, reusing an existing session when there is one.
- Point local state at the org you’re joining - it rewrites
.capy/sync-stateand deleteskeep.lockin the current directory when that file belongs to a different org. - Verify your membership with Capy’s service before touching any key material.
- Install that org’s master key on this machine at
~/.capy/orgs/{orgId}/users/{userId}/key.enc, unless it’s already there.
capy afterwards to sync secrets. From then on, capy org lists the new org alongside any others you belong to.
What’s next
Inviting users
Add someone to your org.