Authentication
opentraces publishes to HuggingFace Hub. You need an HF account.
Token Login (Recommended)
opentraces login --token
Prompts for a HuggingFace access token. Generate one at huggingface.co/settings/tokens with write scope. This is required for creating datasets and pushing traces.
Browser Login
opentraces login
Opens a browser-based OAuth device code flow, similar to gh auth login. You'll see a short code to enter at huggingface.co.
Note: OAuth tokens can write to existing dataset repos but cannot create new ones. If your dataset repo doesn't exist yet, use
opentraces login --tokenwith a write-access personal access token to create it.
Environment Variable
export HF_TOKEN=hf_...
The CLI checks for HF_TOKEN automatically. Useful in CI pipelines where interactive login isn't available.
Auth Precedence
HF_TOKENenvironment variable- Stored credentials from
opentraces login
Verify
opentraces whoami
Shows your authenticated HuggingFace username.
Logout
opentraces logout
Clears stored credentials from ~/.opentraces/credentials.json.