Authentication methods
- Browser login
- API token
- CI
repost auth login opens the Repost app in your browser, waits for a local callback, then stores the generated API token securely. The browser flow waits for up to 5 minutes.repost auth login keeps the existing token and asks you to run repost auth logout before switching accounts.Credential storage
System keychain first
The CLI uses macOS Keychain, Windows Credential Manager, or a Linux keyring when available.
Encrypted file fallback
If a system keychain is unavailable, the CLI stores an encrypted token in the config directory.
Environment wins
REPOST_TOKEN overrides any token saved by repost auth login or repost auth token.Token lookup order
The CLI reads credentials in this order:| Source | When it is used |
|---|---|
REPOST_TOKEN | Set this for CI, scripts, and temporary shells. It overrides stored credentials. |
| Secure storage | Created by repost auth login or repost auth token. |
REPOST_TOKEN before testing a token saved on your machine.
Verify or remove authentication
repost auth status validates the token when the server is reachable. If a stored token was revoked, the CLI removes the local copy and asks you to authenticate again.
If the server cannot be reached, repost auth status falls back to local state. It shows the configured auth method and the config directory, but it cannot prove that the token is still valid.
repost auth logout attempts to revoke the stored token on the server, then removes the token saved in secure storage. It does not unset REPOST_TOKEN; clear that environment variable separately for CI or temporary shells.Configuration location
The CLI stores local preferences in an operating-system-specific config directory. The same directory is used for encrypted token fallback when a system keychain is unavailable.--config has the highest priority. REPOST_CONFIG_DIR is the environment equivalent.
REPOST_BASE_URL derives all service URLs from one base domain. More specific variables override that derived value.
| Variable | Derived value when REPOST_BASE_URL=example.com |
|---|---|
REPOST_API_URL | https://cli.example.com |
REPOST_WEB_URL | https://app.example.com |
REPOST_WS_URL | wss://ws.example.com/ws |