Authentication
Log in with an API key, use env vars for CI, and manage credential storage.
Global package: social0. Thin client over https://api.social0.app/v1.
API keys
Create a key (sk_live_…) in Dashboard → API keys. Keys must start with sk_live_… (legacy s0_live_… still works).
social0 login # masked prompt
echo "sk_live_..." | social0 login
social0 whoami # name, email, plan, API URL, masked key
social0 logoutwhoami calls GET /v1/me and confirms the key works.
Environment variables (CI / headless)
Set SOCIAL0_API_KEY — the CLI uses it as-is and does not write it to disk:
export SOCIAL0_API_KEY=sk_live_...
social0 accounts --json
social0 publish -c "CI deploy" -p twitter| Variable | Purpose | Default |
|---|---|---|
SOCIAL0_API_KEY | API key for CI / headless | — |
SOCIAL0_API_URL | API base URL | https://api.social0.app/v1 |
SOCIAL0_CREDENTIAL_PASSPHRASE | Encrypt local fallback credentials | — |
SOCIAL0_REQUEST_TIMEOUT_MS | Request timeout | 30000 |
SOCIAL0_MAX_RETRIES | Retries on HTTP 429 | 3 |
SOCIAL0_VERBOSE | Verbose logs (1 to enable) | 0 |
When both a stored key and SOCIAL0_API_KEY are set, env wins for that run.
Credential storage
| Method | Where | Notes |
|---|---|---|
| OS keychain | macOS Keychain / Linux Secret Service / Windows Credential Manager | Preferred after social0 login |
| File fallback | ~/.social0/ (mode 0600) | Used when keychain is unavailable |
| Env only | Not stored | SOCIAL0_API_KEY — ideal for CI |
Config file: ~/.social0/config.json (non-secret settings like apiUrl, defaultTimezone).
Passphrase encryption
Optional AES encryption for the file fallback:
social0 login --require-passphrase
social0 login --skip-passphrase
social0 passphrase status
social0 passphrase set
social0 passphrase removeOr set SOCIAL0_CREDENTIAL_PASSPHRASE before social0 login.
Custom API URL
Priority (highest first):
--api-url <url>(per command)SOCIAL0_API_URLsocial0 config set apiUrl …- Default
https://api.social0.app/v1
The CLI appends /v1 if you omit it.
social0 --api-url https://api.social0.app accounts
export SOCIAL0_API_URL=https://api.social0.app/v1
social0 config set apiUrl https://api.social0.app/v1
social0 config get apiUrlVerify auth
social0 doctor # auth + API connectivity
social0 accounts # connected platforms