Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview
On this page

luna orgs

List, make and choose organisations, and invite, change and remove the people in one.

luna orgs lists and makes your organisations, chooses the one commands act on, and manages who is in it.

luna orgs list

Reference

luna orgs <COMMAND>

luna org is the same command. The subcommands that act on one organisation take these options.

Option Type Default Does
--org <ORG> text LUNA_ORG, then the folder’s project’s, then the one luna orgs use chose The organisation, by name.
--token <TOKEN> text LUNA_TOKEN, then your login An API token or account key to act with.

luna orgs list

Prints the organisations you belong to, with your role in each. A * marks the one commands act on.

luna orgs list [OPTIONS]
Option Type Default Does
--json flag Off Prints the answer as JSON.

luna orgs create

Makes an organisation. You become its owner, and later commands act on it.

luna orgs create [OPTIONS] <NAME>
Option Type Default Does
<NAME> text Required The organisation’s name.
--json flag Off Prints the answer as JSON.

luna orgs use

Chooses the organisation later commands act on, on this machine.

luna orgs use <NAME>
Option Type Default Does
<NAME> text Required The organisation, by name.

luna orgs members

Prints who is in the organisation: each one’s account id, email and role.

luna orgs members [OPTIONS]
Option Type Default Does
--json flag Off Prints the answer as JSON.

luna orgs invite

Invites someone, and prints the invitation link once.

luna orgs invite [OPTIONS]
Option Type Default Does
--email <EMAIL> text None The address the invitation is for.
--role <ROLE> text viewer The role they get: owner, admin, developer, viewer or billing.

luna orgs invites

Prints the invitations not yet answered, with their id, email, role and expiry.

luna orgs invites [OPTIONS]
Option Type Default Does
--json flag Off Prints the answer as JSON.

luna orgs revoke-invite

Takes back an invitation. luna orgs uninvite is the same subcommand.

luna orgs revoke-invite [OPTIONS] <ID>
Option Type Default Does
<ID> text Required The invitation’s id, from luna orgs invites.

luna orgs set-role

Changes someone’s role.

luna orgs set-role [OPTIONS] <ACCOUNT> <ROLE>
Option Type Default Does
<ACCOUNT> text Required Their email, or their account id from luna orgs members.
<ROLE> text Required owner, admin, developer, viewer or billing.

luna orgs remove

Removes someone from the organisation. It asks first.

luna orgs remove [OPTIONS] <ACCOUNT>
Option Type Default Does
<ACCOUNT> text Required Their email, or their account id from luna orgs members.
--yes flag Off Removes them without asking.

Roles

A role is the same in every project of the organisation. Invite members lists every permission each role holds.

Role Can
owner Do everything, delete the organisation and manage owners.
admin Do everything in projects, members and billing.
developer Make projects and deploy to any project.
viewer View projects, logs and usage.
billing Manage billing and view usage.

Good to know

  • Anyone in the organisation can list its members. invite, invites, revoke-invite, set-role and remove need the owner or admin role. You can remove yourself without either role.
  • Only an owner can invite, make, change or remove an owner. An organisation always keeps at least one owner.
  • An invitation lasts seven days. A new invitation to the same address replaces the last one.
  • An account can be in at most 20 organisations. An API token cannot make or list organisations.
  • With LUNA_TOKEN set, the CLI keeps no chosen organisation. Pass --org or set LUNA_ORG.
  • Without a terminal to ask at, remove stops with exit code 6 unless you pass --yes.

Examples

Make an organisation and use it

luna orgs create Acme

Switch to another organisation

luna orgs use Globex

Invite a developer

luna orgs invite --email dev@example.com --role developer

Make someone an admin

luna orgs set-role ada@example.com admin

Remove someone in a script

luna orgs remove ada@example.com --yes --org acme

Was this page helpful?