CLI reference/Configuration and behavior
Environment variables
Variables the CLI reads, for CI, containers and scripts.
| Variable | Meaning |
|---|---|
CLAVIS_TOKEN | Machine or agent token. Used instead of clavis login, for CI. |
CLAVIS_SERVER | Server URL, like --server. |
CLAVIS_ORG, CLAVIS_PROJECT, CLAVIS_ENV | Like --org, --project, --env. Override .clavis.yaml. |
CLAVIS_AGENT | Agent identity for clavis mcp, like --agent. |
CLAVIS_CREDENTIAL_FILE | Keep the login token in this file (mode 0600) instead of the OS keychain. Useful in containers. |
CLAVIS_CACHE_DIR | Where the offline cache lives. |
CLAVIS_SERVER_FINGERPRINT | Expected SHA-256 of a self-signed server's certificate or public key. Trusts it without a prompt. |
CLAVIS_CA_CERT | PEM file(s) with your own certificate authority, added to the system roots. Separate several with :. |
CLAVIS_TRUST_FILE | Where trusted self-signed servers are stored. Default: trusted-servers.json in the config folder. |
NO_COLOR | Turn off colors. They are also off when output isn't a terminal. |
Server settings (CLAVIS_TLS, CLAVIS_SERVER_BASE_URL, CLAVIS_SETUP_TOKEN, ...) are described in the self-hosting guide.
Examples
CI with a machine token
sh
export CLAVIS_TOKEN=clv_mt_…
clavis run --project web-app --env production ./deploy.sh