skrybe auth
Manage saved credentials. See Authentication for profiles, where the key is stored, and environment variables.
| Command | Description |
|---|---|
auth login | Store an API key for an install |
auth list | List saved profiles |
auth logout | Remove a saved profile |
whoami | Show the active profile and its brand |
auth login
skrybe auth login [--url <url>] [--profile <name>] [--no-verify]
Saves an API key and URL as a profile and makes it the current profile. The
key is read from stdin: you are prompted at a terminal, or it can be piped in.
If SKRYBE_API_KEY is set, that value is saved instead.
| Flag | Description |
|---|---|
--url <url> | Base URL of the install, with http:// or https://. Default SKRYBE_API_URL, then https://dashboard.skry.be. A trailing slash is removed |
--profile <name> | Profile name. Default default |
--no-verify | Save without checking the key against the API |
--url and --profile are the global flags,
so they can go anywhere on the line.
skrybe auth login --profile acme
# API key:
# ✓ Authenticated against https://dashboard.skry.be as brand Acme.
# ✓ Saved profile acme to /home/ada/.skrybe/config.json
Unless --no-verify is given, the key is checked by fetching its brand
(api/brands/get-brands.php). An invalid key fails with
exit code 3 and nothing is saved. An empty key fails with exit code 2.
auth list
skrybe auth list
skrybe auth ls
Lists saved profiles with their URLs. * marks the current profile. Under
--output json each row is {"name": ..., "url": ..., "current": true|false}.
API keys are never printed.
auth logout
skrybe auth logout
skrybe --profile <name> auth logout
Removes the current profile, or the one named with --profile, from the config
file. It does not revoke the key. If the profile does not exist, it says so and
exits 0.
whoami
skrybe whoami
skrybe auth whoami
Shows the active profile, its URL, and the brand the key belongs to. It makes one API call, so it also confirms the key still works.
Profile acme
URL https://dashboard.skry.be
BRAND ID NAME
86 Acme
Under --output json: {"profile": "acme", "url": "...", "brands": [{"id": "86", "name": "Acme"}]}.
Under --output text: one tab-separated line per brand with profile, URL,
brand ID and brand name.