Expand description
XDG-based API key management for OpenRouter and other providers. XDG-based API key management for OpenRouter and other providers.
Stores keys in $XDG_CONFIG_HOME/sqlite-graphrag/config.toml with
atomic write, symlink-attack defense and Unix permission hardening.
Structs§
- ApiKey
Entry - API key entry.
- AppConfig
- App config.
- Resolved
Key - Resolved key.
- Setting
Key - One entry of the canonical setting registry.
Constants§
- SETTING_
KEYS - Canonical registry of operational setting keys accepted by
config set.
Functions§
- compute_
fingerprint - Compute fingerprint.
- config_
file_ path - Absolute path of
config.toml. - get_
setting - Read an operational setting from XDG config (flag > XDG > default is
applied by callers). Returns
Nonewhen unset. - is_
known_ setting - Returns
truewhenkeybelongs toSETTING_KEYS. - list_
settings - List all operational settings (no secrets).
- load_
config - Load application configuration from the XDG config file.
- mask_
key - Mask key.
- resolve_
api_ key - Resolve API key.
- save_
config - Persist application configuration to the XDG config file.
- set_
setting - Persist an operational setting in XDG config.toml (G-T-XDG-01).
- setting_
key_ names - Iterates the registry key names in registration (sorted) order.
- unset_
setting - Remove an operational setting from XDG config.toml.