Usage
facet login --token or FACET_TOKEN.
The registry verifies your identity before the CLI saves a usable credential. For CI and scripts, supply FACET_TOKEN instead of running interactive login.
Examples
Flags
boolean
Start browser sign-in and try to open the verification page. The URL and code are always printed, so you can finish manually if opening the browser fails.
boolean
Start the same sign-in flow without opening a browser. Open the printed URL on a device with a browser and enter the code while the command waits.
boolean
Paste a personal access token from your account at agentfacets.io. Requires an interactive terminal and cannot be combined with a browser flag.
Exit codes
Output
Browser sign-in prints a verification URL and user code, thenLogged in as yourname. after verification succeeds. Press Ctrl+C to cancel. A pasted token also prints your account tier after it is verified.
Details
Browser verification
Confirm the code shown in your terminal on the verification page. Complete any registry account setup requested in the browser, then sign in again if the CLI asks you to finish onboarding. This uses the OAuth device authorization flow, with a public client ID and no embedded API key or client secret. The CLI does not need a browser redirect back to your machine. It accepts only the selected registry’s validated sign-in configuration and rejects unexpected authentication redirects.Where the credential is stored
See browser credential storage and registry binding. A verified personal access token is written to the credentials file:Token precedence
Commands select the first available credential in this order:- Non-empty
FACET_TOKEN. - A saved personal access token.
- A browser session for the selected registry.
FACET_TOKEN and remove a saved token with facet logout before using browser sign-in. Removing a saved token can reveal an existing browser session.
A rejected or unreadable selected credential fails the command. The CLI does not switch to another identity or retry anonymously after an authentication failure.
Session renewal
Commands renew browser sessions when needed and verify the registry identity before using them. A temporary network or registry verification outage fails the command while preserving local sign-in state; retry when connectivity returns. An expired or revoked session requires browser sign-in again. If a refresh outcome cannot be confirmed within the safe retry window, the CLI stops renewing it and asks you to sign in again rather than replaying an old refresh indefinitely.Troubleshooting
browser sign-in did not complete
browser sign-in did not complete
Cause: verification expired, was denied, or was cancelled.Fix: start
facet login --browser or facet login --no-browser again and complete the new verification prompt.registry account setup is required
registry account setup is required
Cause: browser authentication succeeded, but registry onboarding is incomplete.Fix: open the onboarding page reported by the CLI, finish setup, then sign in again.
local sign-in state could not be read or updated
local sign-in state could not be read or updated
Cause: your browser credential storage failed its safety checks.Fix: check the local state requirements, correct ownership and permissions, then retry. The CLI will not weaken these checks to save credentials.
your registry credentials could not be read
your registry credentials could not be read
Cause: the personal access token file exists but is unreadable or malformed.Fix: check its permissions, run
facet login --token to replace it, or set FACET_TOKEN for the current shell.the token was rejected
the token was rejected
Cause: the registry refused the pasted token, usually because it was revoked, expired, or copied incompletely.Fix: mint a new token in your account settings and paste it again with
facet login --token.