Skip to main content

Module config

Module config 

Source
Expand description

Where the CLI gets its server, key and defaults.

Precedence for the key: --api-key, then SEMORA_API_KEY (process env, then .env in this folder or a parent), then the stored login. The server: --server, SEMORA_URL, config.toml, then the stored default.

Structs§

FileConfig
~/.config/semora/config.toml
Flags
Settings

Enums§

KeySource

Constants§

DEFAULT_WAIT_TIMEOUT

Functions§

config_dir
SEMORA_CONFIG_DIR, else ~/.config/semora (on every platform).
load_dotenv
Loads the first .env found in the current folder or its parents. Variables already set in the process win.
origin
parse_server
Normalizes a server URL to its origin (no path, no trailing slash).
read_file_config
resolve