Skip to main content

cloider login, logout and profile command reference

cloider login gets the CLI an API token, cloider logout revokes it, and cloider profile switches between several logins, one per account or API. This page is the flag by flag reference; Authentication explains the concepts, token precedence and CI use.

Commands​

CommandDescription
cloider loginLog in through the browser, or with an API token
cloider logoutRevoke the CLI's token and forget it
cloider profile listList profiles
cloider profile useMake a profile the one in use
cloider profile addAdd or change a profile, for example one whose token is kept in a file of your own
cloider profile removeForget a profile, without revoking its token

cloider whoami is on the account commands page. All commands also take the global flags; --profile, --api-url and --token-file matter most here.

cloider login​

Log in through the browser, or with an API token. The token is saved for the profile in use (default unless you pass --profile), in ~/.cloider/token or ~/.cloider/tokens/<profile>.

cloider login [flags]
FlagTypeDefaultDescription
--no-browserboolfalsePrint the login link instead of opening it, then paste the token the page shows
--with-tokenboolfalseRead the token from stdin. Can't be combined with --no-browser
--read-onlyboolfalseAsk for a token that can only read (preselects Read only on the page)

Global flags that change what login does:

Global flagEffect on login
--profile <name>Save the login as this profile instead of the current one
--token-file <path>Use the token in this file, where it is. The profile remembers the path and reads the file on every command
--api-url <url>Log in to another API. The profile remembers it

The four ways to log in:

cloider login # through the browser: pick the account and Read or Read & Write
cloider login --no-browser # print the link, paste the token the page shows
cloider login --with-token < token.txt # a token generated under Access Control, API Tokens
cloider login --token-file ~/secret # use the token in that file, where it is
Output
✓ Logged in as jane@example.com in account jane@example.com (Read & Write)

Log in to a second account as a profile:

cloider login --profile acme
Output
✓ Logged in as jane@example.com in account billing@acme.example (Read & Write)
Saved as profile "acme". Switch to it with `cloider profile use acme`.

What login does, in order:

  1. Gets a token: from the browser (a local callback on 127.0.0.1, waiting up to 5 minutes), from the pasted value, from stdin, or from the file.
  2. Checks it by calling the API's whoami. A token that doesn't work fails with that token is not valid, or was revoked (exit code 3).
  3. If the profile already had a different token the CLI wrote itself, revokes the old one on Cloider (Revoked the token this profile used before.).
  4. Saves the token (or the token file's path), the API URL and the account in ~/.cloider, and makes the profile current if no profile was current yet.
  5. Warns if CLOIDER_TOKEN or CLOIDER_TOKEN_FILE is set, since they take precedence over the login.

Without flags, login needs a terminal; in a script it fails with not running in a terminal: use `cloider login --with-token`, or set CLOIDER_TOKEN (exit code 2). See Authentication for the browser page step by step. There is no MCP tool for login.

cloider logout​

Revoke the profile's token on Cloider and remove it from ~/.cloider.

cloider logout [flags]
FlagTypeDefaultDescription
--allboolfalseLog out of every profile
cloider logout
cloider --profile acme logout
cloider logout --all
Output
✓ Logged out of profile default
  • A token file you pointed a profile at with --token-file is revoked but left in place: Left <path> in place, remove it yourself if it should go.
  • A token passed to this command with --token-file, CLOIDER_TOKEN or CLOIDER_TOKEN_FILE is revoked instead of the profile's, and left where it is: Revoked the token from CLOIDER_TOKEN and It is left in place, remove it yourself.
  • With nothing to log out of, it prints Not logged in. and exits with 0.
  • A token that was already revoked doesn't make logout fail.

There is no MCP tool for logout.

cloider profile​

A profile is an API URL and a token. Log in once per account, or per API, with cloider login --profile <name>, then switch with cloider profile use <name>. Profile names use letters, digits, ., _ and -, up to 64 characters.

Alias: cloider profiles. The profile a command uses is the first of: --profile, CLOIDER_PROFILE, the one cloider profile use picked, and default.

cloider profile list​

cloider profile list [flags]
cloider profile list
Output
NAME CURRENT ACCOUNT API TOKEN
acme * billing@acme.example https://cloider.com/api /Users/jane/.cloider/tokens/acme
ci - https://cloider.com/api /run/secrets/cloider
default jane@example.com https://cloider.com/api /Users/jane/.cloider/token

CURRENT marks the profile in use; TOKEN is the file the token is read from, or (not logged in) when that file doesn't exist. -o json prints name, current, account, api_url, token_file and logged_in for each profile.

cloider profile use​

Make a profile the one in use from now on. The profile must exist (default always does).

cloider profile use <name> [flags]
cloider profile use acme
Output
✓ Using profile acme

An unknown profile fails with exit code 4: no profile "acem", create it with `cloider login --profile acem` .

cloider profile add​

Add a profile, or change one, without logging in through the browser: for example one whose token is kept in a file of your own, or one that talks to another API URL.

cloider profile add <name> [flags]

add uses the global flags --token-file and --api-url as its settings:

cloider profile add ci --token-file /run/secrets/cloider
Output
✓ Saved profile ci
cloider --profile ci whoami

The token file must exist and contain a token when you add it; the CLI warns if others can read it.

cloider profile remove​

Forget a profile. The token file the CLI wrote for it is deleted, but the token is not revoked on Cloider: run cloider --profile <name> logout first if it should stop working.

cloider profile remove <name> [flags]

Alias: cloider profile rm.

cloider --profile ci logout
cloider profile remove ci
Output
✓ Removed profile ci

Frequently asked questions

How do I log in to the Cloider CLI without a browser?

Use cloider login --no-browser and paste the token the page shows, or cloider login --with-token < token.txt with a token created under Access Control, API Tokens.

How do I switch between Cloider accounts in the CLI?

Log in once per account with cloider login --profile <name>, then switch with cloider profile use <name>, per command with --profile, or per shell with CLOIDER_PROFILE.

Does cloider profile remove revoke the token?

No. It forgets the profile and deletes the token file the CLI wrote, but the token keeps working. Run cloider logout for the profile first to revoke it.

How do I log out of every account?

Run cloider logout --all. It revokes and removes the token of every profile.