Skip to main content

Module config

Module config 

Source
Expand description

Engine config file and credential-storage selection. Engine configuration file and credential-storage selection.

cli-engine reads an optional per-application TOML config file at <config-base>/<app_id>/config.toml, where <config-base> is $XDG_CONFIG_HOME, $HOME/.config, or %APPDATA% (see config_base_dir). Loading is best-effort: a missing file yields defaults, and a malformed file logs a warning and falls back to defaults rather than failing the command.

The primary setting today selects where credentials are stored — see CredentialStore. The effective mode is resolved with the precedence

--credential-store flag  >  ${PREFIX}_CREDENTIAL_STORE env  >  config file  >  default (Keyring)

where ${PREFIX} is the app id sanitized by app_id_env_prefix. See resolve_credential_store and the pure resolve_credential_store_with.

Structs§

ConfigFile
A loaded per-application config file.
CredentialsConfig
The [credentials] table of the engine config file.
EngineConfig
Top-level engine configuration parsed from config.toml.
ParseCredentialStoreError
Error returned when a string does not name a CredentialStore variant.

Enums§

CredentialStore
Where an auth provider stores credentials.

Functions§

config_file_path
Returns the path to the engine config file for app_id, if a base config directory can be resolved and app_id is a safe single path component.
credential_store_env_var
Derives the credential-store override env var from an app id, e.g. godaddy -> GODADDY_CREDENTIAL_STORE.
load
Loads the engine-reserved config for app_id.
resolve_credential_store
Resolves the effective CredentialStore for app_id against process state.
resolve_credential_store_with
Resolves the effective CredentialStore from explicit inputs.