Skip to content

Authentication

Coldrune uses passwordless authentication. No passwords to remember or rotate.

# Request a 6-digit code via email
coldrune auth login --email you@example.com

# Verify the code
coldrune auth verify --code 123456

The code expires after 10 minutes. An incorrect guess invalidates the code immediately — you’ll need to request a new one.

Your session token is stored at ~/.config/coldrune/session with 0600 permissions.

coldrune auth whoami
coldrune auth logout

Set SMTP_HOST=log in your .env to print login codes to the server terminal instead of sending email. No SMTP credentials required.

For CI/CD and automation, use service accounts instead of interactive login. Service accounts authenticate with an API key via the X-API-Key header.

The CLI auto-detects the auth method:

SourcePrefixHeader
Session file(none)Authorization: Bearer <token>
COLDRUNE_API_KEY env varcr_sa_X-API-Key: <key>
ActionLimit
Login requests5 per email per 15 minutes
Failed verifications10 per email per hour (hard lockout)
# Request code
curl -X POST http://localhost:7100/api/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email": "you@example.com"}'

# Verify code
curl -X POST http://localhost:7100/api/auth/verify \
  -H 'Content-Type: application/json' \
  -d '{"email": "you@example.com", "code": "123456"}'
# Response: {"token": "..."}

# Use the token
curl http://localhost:7100/api/auth/me \
  -H 'Authorization: Bearer <token>'