Usage
What it does
- Prompt for token. Presents an interactive menu. Select “Paste a token” and paste the PAT from your account at facet.cafe.
- Verify token. Calls
GET /v0/auth/meto confirm the token is valid. A typo or expired token fails immediately with the registry’s own error message, and you are reprompted. - Persist credential. Writes the verified token to
$FACET_DIR/credentials(default~/.facet/credentials) in INI format with mode0600.
Credential file format
0600 permissions so only the current user can read it.
Token precedence
When bothFACET_TOKEN and the credentials file are present, FACET_TOKEN takes precedence. The login command notes this so the environment variable does not silently shadow the file.
Exit codes
| Code | Meaning |
|---|---|
0 | Signed in successfully. |
1 | Failed (non-interactive terminal, invalid token, network error). |
See also
facet whoami— verify the signed-in identity.facet logout— remove saved credentials.facet publish— publish a facet (requires authentication).