Expand description
Configuration file management for llmshim.
Config file location: ~/.llmshim/config.toml
Precedence (highest to lowest):
- Environment variables (OPENAI_API_KEY, etc.)
~/.llmshim/config.toml
Structs§
- Config
- The full config file structure.
- Keys
- Proxy
Config
Functions§
- apply_
to_ env - Apply config keys as environment variables (only if not already set). This implements the precedence: env vars > config file.
- config_
dir - Get the config directory path (~/.llmshim/).
- config_
path - Get the config file path (~/.llmshim/config.toml).
- load
- Load config from ~/.llmshim/config.toml. Returns default if file doesn’t exist.
- save
- Save config to ~/.llmshim/config.toml. Creates the directory if needed.