Skip to content

surreal cloud

/

Commands

surreal cloud team

surreal cloud team manages organisation members: the people who already belong. Invitations that have been sent but not accepted live in invite, and team list deliberately does not fold them in - a pending invitation is not a member.

Usage
surreal cloud team <COMMAND> [OPTIONS]surreal cloud teams <COMMAND> [OPTIONS]
VerbPurposeAlias
listList the members of an organisationls
getShow one member
inviteInvite someone to an organisation
updateChange a member's role
removeEnd someone's membership of an organisationrm

Two verbs here break the house grammar on purpose. remove is not delete, because delete invites the reading that the person is deleted rather than their membership. invite exists because sending one is how a team gains a member and no house verb covers it - and it shares invite create's implementation rather than copying it.

The API has no route for a single member, so get, update and remove fetch the member list and match locally, by user id or username, with did-you-mean suggestions when nothing matches. The display name is never a key, because it is neither unique nor stable.

This group declares the scopes read:cloud and write:cloud-organization, the same pair as org and invite, because the API has no separate scope for membership. A personal access token cannot use the mutating verbs: see Authentication.

List the members of an organisation.

Usage
surreal cloud team list [OPTIONS]

This command takes no positional argument. The organisation comes from --org and the precedence chain.

Accepts the list presentation flags and nothing else. Column ids are username, name and role, with user_id and profile_picture under --wide.

surreal cloud team list
Output
USERNAME             NAME            ROLE
ana@acme.example     Ana Silva       owner
bo@acme.example      Bo Nakamura     admin
cai@acme.example     Cai Oduya       member
Owners and admins only
surreal cloud team list --json | jq -r '.[] | select(.role != "member") | .username'

Show one member.

Usage
surreal cloud team get [OPTIONS] <MEMBER>

Arguments

NameDescription
<MEMBER>
required
The member, by username or user id.

This command has no options of its own.

surreal cloud team get bo@acme.example

A reference that does not match any member exits 5, and lists the near matches it found. The detail view shows the username, role, user id and organisation id.

Invite someone to an organisation.

Usage
surreal cloud team invite [OPTIONS] --role <ROLE> <EMAIL>

Arguments

NameDescription
<EMAIL>
required
The email address to invite.

Options

NameDescription
--role<ROLE>
required
The role to grant. Run surreal cloud org roles for the ones this organisation defines.
surreal cloud team invite dee@acme.example --role member

The answer is the invitation, not a member - the person appears in team list only once they accept. Track it in the meantime with invite list.

Refusals, exit 2, before any request. The address validator is deliberately shallow - an @ with something either side and no internal whitespace - because the API is the authority on deliverability:

`dee.acme.example` is not an email address: it has no `@`.

The role vocabulary is per organisation, so only an empty value is refused locally:

A role cannot be empty. Run `surreal cloud org roles` to see the ones this organization defines.

A role the API rejects as invalid is annotated with a pointer to org roles - but only for that class of error, never for a 403 or a rate limit, where the role is not the problem.

An invitation is not retried automatically, because a repeat would send a second email with a second working code.

Change a member's role.

Usage
surreal cloud team update [OPTIONS] --role <ROLE> <MEMBER>

Arguments

NameDescription
<MEMBER>
required
The member, by username or user id.

Options

NameDescription
--role<ROLE>
required
The new role. Run surreal cloud org roles for the ones this organisation defines.
surreal cloud team update cai@acme.example --role admin

The command prints the updated member. The role is compared exactly as written: if the member already holds it, the command prints a note that nothing changed, sends no request and exits 0.

End someone's membership of an organisation.

Usage
surreal cloud team remove [OPTIONS] <MEMBER>

Arguments

NameDescription
<MEMBER>
required
The member, by username or user id.

Options

NameDescription
--force
Remove without confirming.
With a confirmation
surreal cloud team remove cai@acme.example
From an offboarding script
surreal cloud team remove cai@acme.example --force --json

This ends a membership. It does not delete the person's SurrealDB account, and it does not touch anything they created.

Refusals. The confirmation names the person and the organisation, and says that the account is not deleted. Declining prints Nothing was changed. and exits 0. Removing yourself prints a warning first, because only another member can invite you back. In a non-interactive session without --force or --yes, it exits 2 having sent nothing.

Was this page helpful?