Skip to content

sb auth

Store an API token for authenticating with SkillsBin, or check the status of a stored token.

Usage

Terminal window
sb auth <token>
sb auth --status

Arguments

ArgumentDescription
tokenAn API key starting with sk-. Required unless --status is used.

Flags

FlagDescription
--statusCheck validity of the currently stored token instead of saving a new one.

Examples

Save a new token

Terminal window
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

Terminal window
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

CodeCause
MISSING_TOKENNo argument provided and --status not used.
INVALID_TOKENToken does not start with sk-.
AUTH_INVALIDServer returned 401 — token expired or revoked.