With the desktop app
Open Aspect and sign in, then run:A signed-in desktop session takes precedence over both an environment API key and a stored key.
aspect auth status --json reports the source as desktop, env, or auth-file, and reports a key that is set but ignored. An offline signed-in desktop session does not silently switch to the key’s account.Create an API key
Use a key for a Linux server, render worker, CI job, or another CLI-only installation.- Sign in to the Aspect web app.
- Open Settings → API Keys.
- Choose Create new API Key and give it a name that identifies its use.
- Copy the key, which begins with
sk_. The full key is shown once.
Sign in on a CLI-only computer
Run this in an interactive terminal and paste the key at the hidden prompt:auth login validates and stores an API key. It is not a browser sign-in flow. The default stored-key file is ~/.aspect/cli/auth.json; treat it as a credential file.
If the CLI asks you to open or sign in to the installed Aspect app, follow that instruction. The desktop app is the sign-in path on that workstation.
Headless machines and CI
SetASPECT_API_KEY through your job runner’s secret or environment settings. Authenticated commands use it without a preceding auth login:
auth login without a supplied key cannot prompt in --json mode; an environment key is the normal choice for scripts.
Sign out or revoke a key
ASPECT_API_KEY from your environment, or sign out the desktop app.
To revoke a key, delete it from Settings → API Keys in the web app. To change the desktop identity, sign out of the desktop app. Check aspect auth status after changing credentials so you know which identity the next command will use.
If a command reports not_logged_in or invalid_api_key, follow Troubleshooting.