LemonCore. Config
(lemon_core v0.1.0)
View Source
Canonical Lemon configuration loader.
Loads TOML configuration from:
- Global:
~/.lemon/config.toml - Project:
<project>/.lemon/config.toml
Both locations are configurable; see LemonCore.Paths.
Project values override global values. Environment variables override both.
Configuration is delegated to LemonCore.Config.Modular which enforces
the canonical config schema and rejects deprecated sections ([agent],
[agents], [agent.tools]).
Summary
Functions
Load config using the supervised cache when available.
Get a nested config value.
Path to global config file.
Load merged config (global + project) with environment overrides.
Load a single TOML file without environment overrides.
Path to project config file for a given cwd.
Force a reload from disk (and update the cache when available).
Return config as a plain map.
Types
@type provider_config() :: %{ optional(:api_key) => String.t() | nil, optional(:base_url) => String.t() | nil, optional(:api_key_secret) => String.t() | nil, optional(:auth_source) => String.t() | nil, optional(:oauth_secret) => String.t() | nil, optional(:project) => String.t() | nil, optional(:project_id) => String.t() | nil, optional(:project_secret) => String.t() | nil }
Functions
Load config using the supervised cache when available.
This is the default hot-path read. It avoids re-reading/parsing TOML on every call.
Get a nested config value.
@spec global_path() :: String.t()
Path to global config file.
Load merged config (global + project) with environment overrides.
Load a single TOML file without environment overrides.
Path to project config file for a given cwd.
Force a reload from disk (and update the cache when available).
Use this for explicit reload flows (e.g. admin reload, control plane refresh).
Return config as a plain map.