Skip to main content

Environment variables

Authentication​

VariableDescription
KOBANA_<PRODUTO>_TOKENA product's (Bearer) token: KOBANA_BANKING_TOKEN, KOBANA_FINANCE_TOKEN… It has the highest priority. Kadu also reads KADU_TOKEN
KOBANA_CREDENTIALS_FILEPath to a credentials JSON (the auth export format). It needs the product field; it applies only to that product and to the file's environment (without it, any environment)
KOBANA_CLIENT_IDLogin Client ID (default: kobana-cli)
KOBANA_CLIENT_SECRETClient secret. Like --client-secret, it selects the Client Credentials flow (banking only); a person's login (PKCE) does not use a secret
KOBANA_ACCOUNT_URLAddress of the Kobana Account used for login (default: the environment's one)
KOBANA_WORKSPACE_IDWorkspace sent in X-Workspace-Id by finance (required), dashboards and dunning. A value in --params wins

Configuration​

VariableDescription
KOBANA_CONFIG_DIRConfiguration folder (default: ~/.config/kobana)
KOBANA_ENVIRONMENTproduction (default), sandbox or development; any other value is an error
KOBANA_LANGpt, en or es. --lang wins

Logs​

VariableDescription
KOBANA_LOGLog level on stderr, for example kobana=debug. Off by default
KOBANA_LOG_FILEFolder for JSON logs with daily rotation. Off by default

.env file​

Any variable can also live in a .env: the one in the current folder (never the ones in parent folders) and the one in the configuration folder. A variable already set in the environment wins over both.

The .env in the current folder does not define credentials. It may come from a third-party repository, which could send the login to another server, store credentials inside it or make the CLI act with someone else's token. That is why KOBANA_ACCOUNT_URL, KOBANA_CONFIG_DIR, KOBANA_CREDENTIALS_FILE, KOBANA_CLIENT_ID, KOBANA_CLIENT_SECRET and all tokens (KOBANA_*_TOKEN, KADU_TOKEN) are ignored in it — the CLI warns you. Set those in the environment or in the .env of the configuration folder.