Skip to main content
The CLI is a single repost binary. Install it first, then authenticate before running commands that talk to your Repost account.
1

Install the binary

Use the installer for your operating system. The installer downloads the matching release and installs the repost binary.
curl -fsSL https://releases.repost.sh/cli/install.sh | sh
2

Check the version

repost version
3

Authenticate

For day-to-day use, browser login is the recommended path.
repost auth login

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.
repost auth login
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:
SourceWhen it is used
REPOST_TOKENSet this for CI, scripts, and temporary shells. It overrides stored credentials.
Secure storageCreated by repost auth login or repost auth token.
Clear REPOST_TOKEN before testing a token saved on your machine.

Verify or remove authentication

repost auth status
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 --config ./tmp/repost-cli auth status
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.
VariableDerived value when REPOST_BASE_URL=example.com
REPOST_API_URLhttps://cli.example.com
REPOST_WEB_URLhttps://app.example.com
REPOST_WS_URLwss://ws.example.com/ws