Documentation
¶
Overview ¶
Package config loads TOML configuration and environment-backed runtime overrides for the kb CLI.
Index ¶
Constants ¶
View Source
const ( // DefaultDotEnvPath is the local dotenv file loaded by the CLI entrypoint. DefaultDotEnvPath = ".env" // EnvConfigPath overrides the config file path. EnvConfigPath = "APP_CONFIG" // EnvFirecrawlAPIKey stores the Firecrawl API key override. EnvFirecrawlAPIKey = "FIRECRAWL_API_KEY" // EnvFirecrawlAPIURL stores the Firecrawl API URL override. EnvFirecrawlAPIURL = "FIRECRAWL_API_URL" // EnvOpenRouterAPIKey stores the OpenRouter API key override. EnvOpenRouterAPIKey = "OPENROUTER_API_KEY" // EnvOpenRouterAPIURL stores the OpenRouter API URL override. EnvOpenRouterAPIURL = "OPENROUTER_API_URL" )
Variables ¶
This section is empty.
Functions ¶
func ApplyEnvOverrides ¶
func ApplyEnvOverrides(cfg *Config)
ApplyEnvOverrides overlays config values that are sourced from environment variables at runtime.
func LoadDotEnvIfPresent ¶
LoadDotEnvIfPresent loads a local dotenv file without overriding env vars already supplied by the shell or process manager.
Types ¶
type Config ¶
type Config struct {
App AppConfig `toml:"app"`
Log LogConfig `toml:"log"`
Firecrawl FirecrawlConfig `toml:"firecrawl"`
OpenRouter OpenRouterConfig `toml:"openrouter"`
}
Config contains the complete TOML-backed runtime configuration.
type FirecrawlConfig ¶
FirecrawlConfig controls URL scraping API access.
type LogConfig ¶
type LogConfig struct {
Level string `toml:"level"`
}
LogConfig controls structured logging output.
type OpenRouterConfig ¶
type OpenRouterConfig struct {
APIKey string `toml:"api_key"`
APIURL string `toml:"api_url"`
STTModel string `toml:"stt_model"`
}
OpenRouterConfig controls the STT fallback provider.
Click to show internal directories.
Click to hide internal directories.