Skip to main content

Module config

Module config 

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

ApiKeyEntry
API key entry.
AppConfig
App config.
ResolvedKey
Resolved key.
SettingKey
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 None when unset.
is_known_setting
Returns true when key belongs to SETTING_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.