Expand description
Layered configuration for the Ijima daemon and CLI.
Resolution order, lowest to highest:
built-in defaults < ijima.toml (file) < env vars < CLI flags§File discovery
The first existing path wins:
$IJIMA_CONFIG(explicit path — errors if unreadable/malformed)$IJIMA_DIR/ijima.toml(or~/.ijima/ijima.toml)/etc/ijima/ijima.toml
Unknown keys in the file are ignored (forward compatibility). An
explicit $IJIMA_CONFIG that cannot be parsed is a hard error — a
deployment that points at a config expects it to be honored.
§Example
# /etc/ijima/ijima.toml
host = "127.0.0.1"
port = 7373
data_dir = "/var/lib/ijima"
issuer_key = "/var/lib/ijima/issuer.key"
rate_base = 10.0
rate_multiplier = 1.0
embedding_model = "sentence-transformers/all-MiniLM-L6-v2"Structs§
- Ijima
Toml - The file layer of Ijima configuration (
ijima.toml). Every field is optional — absent fields fall through to env/defaults.
Functions§
- discover_
path - Returns the config file path if one exists, per the discovery order.
- load
- Loads and parses the config file, if any exists.
- resolve_
data_ dir - Resolves the data directory: env
IJIMA_DIR> config filedata_dir - resolve_
f64 - Resolves an
f64setting: env var > config field > default. Malformed env values fall through to the next layer. - resolve_
path - Resolves an optional-path setting: env var > config field >
None. - resolve_
str - Resolves a string setting: env var > config field > default.