Account and access commands
Reference for the cubicle commands login, logout, whoami, version, keys (SSH public keys), sessions, members, grants, service-accounts and api-keys, with usage, options, output formats, required roles, errors and examples.
These commands manage your login, your SSH keys and sign-ins, organization members, Box grants,
and the service accounts and API keys that programs use. Apart from login and version, each
one calls the API with your stored login. Of these, only whoami works with an API key; see
API-key mode. Organizations and access explains roles
and grants, and Manage organization members walks through adding people and
granting them Boxes.
cubicle login
Signs this computer in by approving a code in the Dashboard. Log in to the CLI walks through the approval.
cubicle login [--api URL] [--no-browser]| Flag | Value | Default | Meaning |
|---|---|---|---|
--api | URL | CB_CLI_API_URL, then the CLI's default | The API to sign in to. cubicle version prints the default, https://api.cubicle.sh. |
--no-browser | none | Off | Do not offer to open the link in a browser. |
- The CLI prints a Dashboard link and a code. On a terminal, and without
--no-browser, it asksPress Enter to open the browser…; Enter opens the link withopenon macOS orxdg-openon Linux. - It checks for your approval every 2 s from the start, whether or not you press Enter. Once you
choose Authorize, it stores the session and prints
Logged in as <identity>. - All output goes to stderr.
--jsonhas no effect. - The code expires after 10 minutes. The CLI then fails with
expired_token: device login expired; start again. - Choosing Deny fails with
login was denied in the browser. - The session lasts 30 days. Then commands fail with
login expired; run `cubicle login`. - The CLI keeps one login. Logging in again replaces the stored login but does not end the
previous session. End it with
cubicle sessions revoke, or runcubicle logoutfirst. - Later commands use the API URL stored with the login, not
CB_CLI_API_URL.
Calls POST /v1/auth/device and
POST /v1/auth/device/token.
Files the CLI writes lists where the token is stored.
cubicle loginTo log in, open:
https://app.cubicle.sh/device?user_code=WDJB-MJHT
and confirm the code WDJB-MJHT.
Press Enter to open the browser…
Logged in as dev@example.com.cubicle logout
Signs this computer out.
cubicle logoutNo options. The command does three things, in order:
- It disconnects the private network if it is connected.
- It ends the session on the server. If that fails, for example because the session has expired, it carries on.
- It removes the stored login from this computer.
It prints Logged out. on stderr and exits 0, also when you were not logged in. The tunnel stays
installed. Calls POST /v1/auth/logout.
cubicle whoami
Prints who you are signed in as and your role in each organization.
cubicle whoami [--json]No options besides --json.
- Output:
<identity> (<org>:<role>, …), with organizations in name order, or<identity> (no orgs). --jsonprints the whole response: yourid,identityandoperatorflag, and for each organization itsid,name,role,personalandboxCreateAllowed. With an API key it also hasapiKey.- With an API key, it shows the service account and its one organization, for example
acme/ci (acme:member).
Calls GET /v1/me.
cubicle whoamidev@example.com (acme:member, dev:owner)dev is the personal organization of dev@example.com. Use cubicle whoami --json to see
whether an organization can create Boxes (boxCreateAllowed).
cubicle version
Prints the CLI's version, build target and default API. It does not call the API.
cubicle version [--json]No options besides --json. --json prints the bundle's build information, including version,
commit, target and apiUrl.
cubicle versioncubicle <version> (darwin-arm64)
default API: https://api.cubicle.shcubicle keys
Manages the SSH public keys on your account. These are keys for SSH logins to Boxes, not API keys. Adding or removing one updates your guest account on every Box you have a grant on. See SSH into a Box.
cubicle keys list
Lists your active SSH keys, oldest first.
cubicle keys list [--json]No options besides --json.
- Output: one line per key,
<key ID> <fingerprint> <comment>. --jsonprints an array of keys withid,fingerprint,comment,publicKeyandcreatedAt.
Calls GET /v1/keys.
cubicle keys list5d2c8f41-9a7e-4b3c-8d1f-2e6a0b9c7d5e SHA256:p4V0c2k8m3FQ0Vt7n1dJm9yG2sLwR6eXhB5uK1aZq0E dev@laptopcubicle keys add
Adds an SSH public key from a file.
cubicle keys add [PUBKEY_FILE] [--json]| Argument | Default | Meaning |
|---|---|---|
PUBKEY_FILE | ~/.ssh/id_ed25519.pub | The public key file to read. |
- Only
ssh-ed25519keys are accepted, up to 1000 characters. Other types fail withinvalid_key: only ssh-ed25519 public keys are accepted. Create one withssh-keygen -t ed25519. - The key's comment is kept, cut to 200 characters.
- A key that is already on your account fails with
conflict: resource already exists. - Output:
added <fingerprint>.--jsonprints the key'sid,fingerprintandcreatedAt.
Calls POST /v1/keys.
cubicle keys add ~/.ssh/id_ed25519.pubadded SHA256:p4V0c2k8m3FQ0Vt7n1dJm9yG2sLwR6eXhB5uK1aZq0Ecubicle keys rm
Removes one of your SSH keys. Your guest accounts stop accepting it.
cubicle keys rm KEY_IDNo options. KEY_ID is an ID from cubicle keys list. The command prints nothing. An unknown ID
fails with not_found: key not found. Calls
DELETE /v1/keys/{key}.
cubicle keys rm 5d2c8f41-9a7e-4b3c-8d1f-2e6a0b9c7d5ecubicle sessions
Your sign-ins: one for each cubicle login and each Dashboard sign-in.
cubicle sessions list
Lists your live sessions, most recently used first.
cubicle sessions list [--json]No options besides --json.
- Output: one line per session,
<session ID> <client>[ (this login)] last used <time|never> expires <time>. <client>iscliordashboard.(this login)marks the session this CLI uses.--jsonprints an array withid,client,createdAt,lastUsedAt,expiresAtandcurrent.
Calls GET /v1/sessions.
cubicle sessions list9c1e7a52-3d4b-4f8a-b6e2-1a0c9d8e7f6b cli (this login) last used 2026-11-05T09:12:44.120Z expires 2026-12-05T09:02:10.553Z
4a7d2e19-8b3c-4e5f-a1d6-0c9b8e7f6a5d dashboard last used 2026-11-04T17:40:02.981Z expires 2026-11-30T08:15:37.004Zcubicle sessions revoke
Ends one of your sessions, for example the CLI login on a lost laptop.
cubicle sessions revoke SESSION_IDNo options. The command prints nothing.
- You can revoke the session this CLI uses. The CLI then fails with
login expired; run `cubicle login`until you log in again. - An ID that is not yours, or is already ended, fails with
not_found: session not found.
Calls DELETE /v1/sessions/{session}.
cubicle sessions revoke 4a7d2e19-8b3c-4e5f-a1d6-0c9b8e7f6a5dcubicle members
Manages an organization's members. Every members command needs --org.
cubicle members list
Lists the organization's members, sorted by identity. Any active member can list them.
cubicle members list --org ORG [--json]| Flag | Value | Default | Meaning |
|---|---|---|---|
--org | Organization name or ID | Required | The organization. |
- Output: one line per member,
<user ID> <identity> <role> <status>. <status>isactiveorrevoked. Service accounts appear with theirORG/NAMEidentity.--jsonprints an array withid,identity,role,statusandserviceAccount.- The user ID is what
grants add,grants rmandmembers rmtake.
Calls GET /v1/orgs/{org}/members.
cubicle members list --org acme1f4a9b7c-2d3e-4f50-8a6b-7c8d9e0f1a2b acme/ci member active
6b9e0d2c-41af-4c3b-8e2d-5f7a9c1b3d4e dev@example.com member active
9d8c7b6a-5f4e-4d3c-8b2a-1f0e9d8c7b6a ops@example.com owner activecubicle members add
Adds an existing Cubicle user to the organization.
cubicle members add --org ORG IDENTITY [--role member|admin|owner] [--json]| Flag | Value | Default | Meaning |
|---|---|---|---|
--org | Organization name or ID | Required | The organization. |
--role | member, admin or owner | member | The role to give. |
IDENTITYis the exact email address the user signs in with, or one of the organization's service accounts asORG/NAME, to change its role; see Service accounts as members. A person must already have an account; otherwise the command fails withnot_found: user not found.- You need the
owneroradminrole. Only anownercan add anowner(forbidden: only owners can add owners). - If the user is already a member, or was removed, the command sets their role and makes them active.
- Output:
<identity> is <role>.--jsonprintsid,identityandrole.
Calls POST /v1/orgs/{org}/members.
cubicle members add --org acme dev@example.com --role admindev@example.com is admincubicle members rm
Removes a member from the organization. They lose access to all of its Boxes.
cubicle members rm --org ORG USER_ID| Flag | Value | Default | Meaning |
|---|---|---|---|
--org | Organization name or ID | Required | The organization. |
USER_IDis an ID fromcubicle members list. You need theowneroradminrole.- The last owner cannot be removed:
last_owner: an organization needs at least one owner. - Removing one of the organization's service accounts ends that account, as
service-accounts rmdoes. - The command prints nothing.
Calls DELETE /v1/orgs/{org}/members/{user}.
cubicle members rm --org acme 6b9e0d2c-41af-4c3b-8e2d-5f7a9c1b3d4ecubicle grants
Manages who may use a Box. Box grants explains what a grant
allows and who needs one, and Grant access to a Box
walks through giving one. BOX is a Box ID or ORG/NAME; see
Box arguments.
cubicle grants list
Lists a Box's grants, sorted by identity. Any active member of the Box's organization can list them.
cubicle grants list BOX [--json]No options besides --json.
- Output: one line per grant,
<user ID> <identity> <status> <guest account>. <status>isactiveorrevoked. The guest account is the Box account that the member's commands and SSH logins use; see Guest accounts.--jsonalso printsdesiredRevisionandappliedRevision. A change has reached the Box when the two match.
Calls GET /v1/boxes/{box}/grants.
cubicle grants list acme/job-11f4a9b7c-2d3e-4f50-8a6b-7c8d9e0f1a2b acme/ci active jv_1f4a9b7c2d3e
6b9e0d2c-41af-4c3b-8e2d-5f7a9c1b3d4e dev@example.com active jv_6b9e0d2c41afcubicle grants add
Gives a member access to a Box.
cubicle grants add BOX USER_IDNo options.
USER_IDis a person's ID fromcubicle members list, or a service account's ID fromcubicle service-accounts list. They must be an active member of the Box's organization; otherwise the command fails withnot_found: member not found.- You need the
owneroradminrole. You can grant a Box to yourself. - The grant creates the member's guest account in the Box, or reactivates a revoked grant.
- The command prints nothing.
Calls PUT /v1/boxes/{box}/grants/{user}.
cubicle grants add acme/job-1 1f4a9b7c-2d3e-4f50-8a6b-7c8d9e0f1a2bcubicle grants rm
Revokes a member's access to a Box. Revoking access says what happens to their guest account.
cubicle grants rm BOX USER_IDNo options.
- Owners and admins can revoke any grant. A member can revoke their own.
- A user without an active grant fails with
not_found: grant not found. - The command prints nothing.
Calls DELETE /v1/boxes/{box}/grants/{user}.
cubicle grants rm acme/job-1 1f4a9b7c-2d3e-4f50-8a6b-7c8d9e0f1a2bcubicle service-accounts
Manages an organization's service accounts: non-interactive members that programs use through
API keys. You need the owner or admin role and an interactive login. Every
service-accounts command needs --org. See
Service accounts and API keys.
cubicle service-accounts list
Lists the organization's service accounts and their API keys.
cubicle service-accounts list --org ORG [--json]| Flag | Value | Default | Meaning |
|---|---|---|---|
--org | Organization name or ID | Required | The organization. |
- Output: one line per account,
<account ID> <identity> <role>, followed by one indented line per API key,key <key ID> <name> <scope> <hint>… last used <time|never>. <hint>is the first 12 characters of the key, to recognize it. Printsno service accountswhen there are none.- Keys that expired but were not revoked are still listed.
--jsonshows each key'sexpiresAt,createdAtandcreatedBy.
Calls GET /v1/orgs/{org}/service-accounts.
cubicle service-accounts list --org acme1f4a9b7c-2d3e-4f50-8a6b-7c8d9e0f1a2b acme/ci member
key 7e3b1c9d-5a4f-4e2b-9c8d-0a1b2c3d4e5f github-actions write cbk_Q7mZ2xRk… last used 2026-11-05T08:30:11.402Zcubicle service-accounts create
Creates a service account with the identity ORG/NAME.
Create a service account and a key shows
the steps that follow.
cubicle service-accounts create --org ORG NAME [--role member|admin] [--json]| Flag | Value | Default | Meaning |
|---|---|---|---|
--org | Organization name or ID | Required | The organization that owns it. |
--role | member or admin | member | Its role in the organization. |
NAMEmatches^[a-z0-9][a-z0-9-]{0,62}$. A name in use fails withconflict: service account ci already exists.- Output:
created <identity> (<account ID>).--jsonprints the account, with an emptykeyslist.
Calls POST /v1/orgs/{org}/service-accounts.
cubicle service-accounts create --org acme cicreated acme/ci (1f4a9b7c-2d3e-4f50-8a6b-7c8d9e0f1a2b)cubicle service-accounts rm
Deletes a service account.
cubicle service-accounts rm --org ORG ACCOUNT| Flag | Value | Default | Meaning |
|---|---|---|---|
--org | Organization name or ID | Required | The organization. |
ACCOUNTis the account's ID or itsNAME, such asci.- Its membership ends, its grants and API keys stop working, and its name is free again.
- An unknown account fails with
not_found: service account not found. - The command prints nothing.
Calls
DELETE /v1/orgs/{org}/service-accounts/{account}.
cubicle service-accounts rm --org acme cicubicle api-keys
Issues and revokes a service account's API keys. You need the owner or admin role and an
interactive login. ACCOUNT is the service account's ID or NAME.
cubicle api-keys create
Creates an API key and prints it once.
cubicle api-keys create --org ORG ACCOUNT NAME --scope read|write [--expires-days N] [--json]| Flag | Value | Default | Meaning |
|---|---|---|---|
--org | Organization name or ID | Required | The organization that owns the service account. |
--scope | read or write | Required | read keys can only call GET routes. write keys can use every route that accepts keys. |
--expires-days | 1 to 3650 days | Never expires | The number of days until the key stops working. |
NAMEmatches^[a-z0-9][a-z0-9._-]{0,62}$. If the account already has a key with that name that is not revoked, even an expired one, the command fails withconflict: resource already exists.- Without
--scope, the command prints itsusage:line and exits 1. - Output: the key (
cbk_…) on the first line, thenStore this key now; it is not shown again., both on stdout. See The key is shown once. --jsonprints the key's details with itstoken. In scripts, usecubicle api-keys create … --json | jq -r .token.
Calls
POST /v1/orgs/{org}/service-accounts/{account}/keys.
cubicle api-keys create --org acme ci github-actions --scope write --expires-days 90cbk_Q7mZ2xRk…
Store this key now; it is not shown again.cubicle api-keys revoke
Revokes an API key. Requests with it fail from then on.
cubicle api-keys revoke --org ORG ACCOUNT KEY_ID| Flag | Value | Default | Meaning |
|---|---|---|---|
--org | Organization name or ID | Required | The organization that owns the service account. |
KEY_IDis the key's ID fromcubicle service-accounts list.- An unknown or already revoked key fails with
not_found: API key not found. - The command prints nothing.
Calls
DELETE /v1/orgs/{org}/service-accounts/{account}/keys/{key}.
cubicle api-keys revoke --org acme ci 7e3b1c9d-5a4f-4e2b-9c8d-0a1b2c3d4e5fCLI
Reference for the cubicle command-line tool on macOS and Linux, covering every command, the global --json and --help options, Box arguments (ID or ORG/NAME), CB_CLI_* environment variables, the files it writes, error output, exit codes and API-key mode for CI.
Box commands
Reference for the cubicle Box commands boxes list, bases, create, get, start, stop and delete, exec, snapshot, snapshots and restore, with options, --wait behavior and the 10-minute deadline, output formats, exit codes, errors and what the CLI cannot do yet.

