Documentation
¶
Overview ¶
Package config handles CLI configuration loading and management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigPath ¶
func DefaultConfigPath() string
DefaultConfigPath returns the default configuration file path for the current platform. - macOS/Linux: ~/.iris/config.yaml - Windows: %USERPROFILE%\.iris\config.yaml
Types ¶
type Config ¶
type Config struct {
DefaultProvider string `yaml:"default_provider"`
DefaultModel string `yaml:"default_model"`
Providers map[string]ProviderConfig `yaml:"providers"`
}
Config represents the CLI configuration.
func LoadConfig ¶
LoadConfig loads configuration from the specified path. If the file doesn't exist, returns an empty config without error. Returns an error only if the file exists but cannot be read or parsed.
func (*Config) GetProvider ¶
func (c *Config) GetProvider(id string) *ProviderConfig
GetProvider returns the provider config for the given ID. Returns nil if the provider is not configured.
type ProviderConfig ¶
type ProviderConfig struct {
APIKeyRef string `yaml:"api_key_ref"`
BaseURL string `yaml:"base_url,omitempty"`
}
ProviderConfig holds configuration for a specific provider.
Click to show internal directories.
Click to hide internal directories.