Skip to main content

Module config

Module config 

Source
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:

  1. $IJIMA_CONFIG (explicit path — errors if unreadable/malformed)
  2. $IJIMA_DIR/ijima.toml (or ~/.ijima/ijima.toml)
  3. /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§

IjimaToml
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 file data_dir
resolve_f64
Resolves an f64 setting: 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.