sb auth
Store an API token for authenticating with SkillsBin, or check the status of a stored token.
Usage
sb auth <token>sb auth --statusArguments
| Argument | Description |
|---|---|
token | An API key starting with sk-. Required unless --status is used. |
Flags
| Flag | Description |
|---|---|
--status | Check validity of the currently stored token instead of saving a new one. |
Examples
Save a new token
sb auth sk-abc123def456# Authenticated successfully. Token sk-abc123d... saved.The token is validated against the server before saving. If the server is unreachable, the token is saved with a warning.
Check current authentication
sb auth --status# Authenticated as sk-abc123d...If no token is stored or the token is invalid:
Not authenticated. Run `sb auth <token>` to set up.Token storage
Tokens are stored in ~/.config/sb/config.json with file permissions 0600. See Configuration for details.
Errors
| Code | Cause |
|---|---|
MISSING_TOKEN | No argument provided and --status not used. |
INVALID_TOKEN | Token does not start with sk-. |
AUTH_INVALID | Server returned 401 — token expired or revoked. |