Documentation Index
Fetch the complete documentation index at: https://docs.blobhub.io/llms.txt
Use this file to discover all available pages before exploring further.
blobhub-worker login is the first-run setup command. It stores your BlobHub API key, pulls your
user profile from BlobHub to validate the key, and records the resulting durable identity.
Synopsis
What it does
- Prompts for an optional BlobHub API URL (default
https://api.blobhub.io/v1; press Enter to accept). - Prompts for your BlobHub API key (read with
getpass, so it is not echoed to the terminal). - Calls
GET /v1/users/mewith the supplied key to validate it and retrieve youruser_id,name, andemail. - Writes
~/.blobhub-worker/credentials.yamlwith mode0600: - Writes (or refreshes)
~/.blobhub-worker/identity.yaml:
Identity-change guard
Ifidentity.yaml already records a user_id and the new API key resolves to a different
user_id, the command warns and requires explicit confirmation before overwriting. This protects
against silently swapping the actor identity by switching credentials.
Errors
| Code | Meaning |
|---|---|
AUTH_INVALID | The server rejected the API key (401/403 from /v1/users/me). |
USER_IDENTITY_MISMATCH | The server’s user_id differs from the previously recorded value, and confirmation was declined. |
INSECURE_CREDENTIALS_PERMISSIONS | credentials.yaml exists but is world-readable (refused). |
Recommendation
For production use, create a dedicated service-account user in BlobHub and use that user’s API key for the worker. Some job types (notably Session Agent Harness) classify any post made by the worker’s ownuser_id as “self” and filter it out — running under a dedicated identity keeps
your own posts from being silently dropped. See the
Session Agent Harness reference for details.

