CLI guide
GitHub

Managing members

source-coop member manages the members of an organization (ACCOUNT) or a product (ACCOUNT/PRODUCT). source-coop invitation answers the invitations that you receive. A member's name is their account ID. You cannot invite by email.

Roles, from most to least access: owners, maintainers, write_data, read_data.

With shell completion, TAB shows:

With --json, these commands print the memberships as the API gives them: membership_id, account_id, membership_account_id, product_id (for a product), role, state and state_changed. invite --json prints an array of the new memberships.

create and delete are other names for invite and revoke.

List and view

source-coop member list my-org                    # members and open invitations
source-coop member list my-org/my-data --json     # the members of a product, as JSON
source-coop member list my-org --state invited    # only open invitations
source-coop member list my-org -i                 # move through the members full screen
source-coop member view my-org alice              # one member; -i for its screen
member list and view, then --json

member list -i uses the same keys as product list -i. On a member's screen:

member list -i: open a member and change their role

Invite

source-coop member invite my-org alice bob --role maintainers
source-coop member invite my-org/my-data -A people.txt --role read_data
source-coop member invite my-org                  # asks who to invite, and the role

invite takes account IDs as arguments.

member invite with prompts, then from flags with --json

Edit

source-coop member edit my-org alice --role owners
source-coop member edit my-org -i                 # select a member, then a role

Without --role, edit asks for a role, starting from the current one. You cannot change the role of an invitation. Revoke it and invite again.

member edit: pick a role, then --role with --json

Revoke and leave

source-coop member revoke my-org alice            # also withdraws an open invitation
source-coop member leave my-org                   # end your own membership

revoke asks you to confirm. For your own membership, you must also type the organization or product name.

leave always asks you to type the name, because only an owner or maintainer can add you again.

Without a terminal, revoke and leave need --yes.

member revoke an invitation, then member leave with the name typed wrong

Your invitations

source-coop invitation list                       # invitations that wait for your answer
source-coop invitation list -i                    # open one, then accept (a) or reject (r) it
source-coop invitation accept my-org/my-data
source-coop invitation reject my-org
source-coop invitation accept -i                  # select an invitation

When you accept, you become a member with the role of the invitation. With --json, the command prints the membership after the change.

invitation list -i: accept one, then reject another