MCPcopy Create free account
hub / github.com/diillson/chatcli / LoadFromEnv

Function LoadFromEnv

cli/agent/quality/config.go:226–238  ·  view source on GitHub ↗

LoadFromEnv reads CHATCLI_QUALITY_* overrides on top of Defaults(). All variables are optional. Unset → default applies. Boolean parsing accepts: 1/0, true/false, yes/no, on/off (case-insensitive).

()

Source from the content-addressed store, hash-verified

224// All variables are optional. Unset → default applies. Boolean parsing
225// accepts: 1/0, true/false, yes/no, on/off (case-insensitive).
226func LoadFromEnv() Config {
227 cfg := Defaults()
228 if v := os.Getenv("CHATCLI_QUALITY_ENABLED"); v != "" {
229 cfg.Enabled = parseBool(v, cfg.Enabled)
230 }
231 loadRefineEnv(&cfg.Refine)
232 loadVerifyEnv(&cfg.Verify)
233 loadReflexionEnv(&cfg.Reflexion)
234 loadPlanFirstEnv(&cfg.PlanFirst)
235 loadHyDEEnv(&cfg.HyDE)
236 loadReasoningEnv(&cfg.Reasoning)
237 return cfg
238}
239
240func loadRefineEnv(c *RefineConfig) {
241 if v := os.Getenv("CHATCLI_QUALITY_REFINE_ENABLED"); v != "" {

Callers 7

RecallMethod · 0.92
showConfigQualityMethod · 0.92
RunMethod · 0.92
initMultiAgentMethod · 0.92

Calls 8

DefaultsFunction · 0.85
parseBoolFunction · 0.85
loadRefineEnvFunction · 0.85
loadVerifyEnvFunction · 0.85
loadReflexionEnvFunction · 0.85
loadPlanFirstEnvFunction · 0.85
loadHyDEEnvFunction · 0.85
loadReasoningEnvFunction · 0.85