How login works
cloudthinker login opens a consent page in your browser and waits for the approval to come back on a loopback callback. The CLI always prints the URL first, so a terminal without a usable browser still has a path forward.

Log in
1
Start the login
2
Approve in the browser
Sign in if you are not already, choose the workspace, and approve the request. The consent code is valid for five minutes.Success state: the terminal prints
Logged in to <workspace>.3
Verify the credential
On a machine without a browser
Two flags cover a remote shell:Work with several workspaces
Each workspace keeps its own credential for the same host, so you log in once per workspace and switch with--workspace. It takes a workspace ID or the exact workspace name.
CLOUDTHINKER_WORKSPACE does the same thing for a whole shell session.
Authenticate a script or CI job
A pipeline has no browser. Two paths work:CLOUDTHINKER_TOKEN and --workspace cannot be combined. The token already names its workspace, so passing both is rejected as a usage error.
Where credentials live
Credentials are written tocloudthinker/credentials.json in your operating system’s config directory, with owner-only permissions. One file holds every workspace credential for a host, keyed by origin and workspace, so logging in to a second workspace never evicts the first.
Log out
Troubleshooting
The command says you are not logged in, exit code 3
The command says you are not logged in, exit code 3
The credential is missing or expired. Run
cloudthinker login again. In a non-interactive shell the CLI never opens a browser; it prints the command to run and stops.The credential in CLOUDTHINKER_TOKEN is rejected
The credential in CLOUDTHINKER_TOKEN is rejected
The environment token outranks stored credentials, so logging in again would change nothing. Replace the token, or unset the variable and run
cloudthinker login.Browser consent timed out
Browser consent timed out
The consent code lives for five minutes. Run
cloudthinker login --device-auth to authorize from another device instead.A workspace name is not accepted
A workspace name is not accepted
--workspace matches an exact name or a workspace ID. Run cloudthinker whoami to see the name the API uses, and quote a name that contains spaces.Related
CLI overview
Install the CLI and run your first session
Reference
Every flag, environment variable, and exit code