Skip to main content
Any signed-in user

Signing in from the CLI

collector login

The CLI signs in without you typing your password into the terminal: you approve it in the browser. That way it also works on a remote machine, over SSH.

The page to approve the CLI: the code to check, who's asking (blurred), the token name, the organizations, read-only, Deny and ApproveThe page to approve the CLI: the code to check, who's asking (blurred), the token name, the organizations, read-only, Deny and Approve

The steps​

  1. The terminal shows a one-time code and opens Collector in your browser, on the Sign in the Collector CLI page. With --no-browser it opens nothing and prints the address, to open it on another machine.
  2. If you weren't signed in, or signed in long ago, Collector asks you to sign in first, and says which terminal it's for: Sign in to approve the sign-in of “…” from your terminal. If your account doesn't have a passkey yet, it asks you to set one up before going on.
  3. Check that your terminal shows this code: the page's must be the same. Asking: says which machine it comes from.
  4. Pick what the token will be: its Token name, its Organizations (All of yours or just one) and whether it's Read-only.
  5. Approve. The page says Done. Go back to your terminal: it's signed in. If you don't recognize the request, Deny: the terminal gets nothing.

The code expires after 10 minutes. If you missed it, run collector login again.

If the page didn't open with the code filled in, type The code your terminal shows and pick Continue.

Where the token lives​

The token is kept in the system keychain (macOS Keychain, Windows Credential Manager, the Secret Service on Linux), or, where there's none, in a file only you can read. It shows under Access tokens in your account, where you can revoke it.

collector whoami # who you are, the token's access, your organizations
collector logout # revokes this machine's token and forgets it

Another Collector​

For a self-hosted or local Collector, add --url, like --url http://localhost:4001. Later commands use the Collector you last signed in to, until you pass another --url.

Without login​

In CI and for agents, skip login: create a token in your account and give it as COLLECTOR_TOKEN. See CI and Agents.