Skip to main content
The CLI authenticates to your Repost account with an API token. Choose a method based on where you run it, then control where credentials and configuration live. New to the CLI? Start with the Quickstart.

Authentication methods

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.
Use this on your own workstation. If a token is already saved, 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: Clear 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.
The config file stores local state such as the CLI session ID, preferred type-generation language, and generation options. Service URLs are resolved at runtime from build defaults or environment overrides. REPOST_BASE_URL derives all service URLs from one base domain. More specific variables override that derived value.