Synopsis
Description
Generates a redeem code that grants<email> access to the current organization.
Capy asks which role to grant, offering only the roles your own role can grant: an Owner or Admin can invite a Member, Project Admin, or Admin; a Project Admin can invite a Member or Project Admin. There is exactly one Owner per org, so Owner is never on the list.
Member and Project Admin are scoped to projects, so Capy then asks which projects to grant - a checkbox list with the project in your current directory preselected.
Capy prints the full capy redeem <code> command for you to pass on, then offers to copy that command: press c to copy, any other key to continue. The recipient runs the command to complete the flow.
Inviting an address that already belongs to a member re-issues their invite instead: same role, same projects, fresh code. That’s how you get a teammate onto a new machine. Pass --role to change their role on the way through.
capy invite is disabled in local-only mode - local mode has no organization, team, or server.
Flags
Codes last 7 days by default. Set
CAPY_INVITE_TTL_SECONDS to change that default for the invites you issue.
Agents and CI
Under--non-tty - or whenever stdin isn’t a TTY - Capy resolves everything from flags instead of prompting:
- No
--role: falls back tomemberfor a new invitee. On a re-issue, Capy keeps the member’s existing role unless you pass--role. - No
--project: keeps the member’s existing projects on a re-issue, otherwise the project in your current directory. If neither applies, Capy exits with code3and tells you to pass--project.
--json writes the code and its metadata to stdout and skips both the human output and the clipboard prompt:
The redeem code
The code is a base64 string that packs a format version, the invite tokenT, the expiry timestamp, the organization ID, and a double-wrapped copy of the master key. The expiry is bound into the outer wrap, so editing the timestamp in the code makes it fail to unwrap.
Deliver it out-of-band (Signal, a password manager share, a QR code, a phone call). Interception alone doesn’t hand over the master key - redeeming needs the service to strip the outer wrap for an authenticated account, and the inner wrap is derived from the org ID plus the invited address, so it only opens for whoever signs in as <email>. Treat the code as a bearer credential for that mailbox anyway.
Email and Slack DMs are not acceptable channels. See Inviting users for why.
Example
See also
capy redeem- the other side of the flow- Roles - what each role can do
- Cryptography → Inviting a new member