Skip to content

loadGlobalRawConfig

loadGlobalRawConfig(options?): Promise<Partial<RawGthConfig> | undefined>

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/dist/config/loader.d.ts:76

Loads the global gsloth config (if present) from the global ~/.gsloth folder.

Precedence support: the returned raw config is intended to act as the BASE that the project config (and CLI overrides) merge on top of, so any value here is the lowest user-controlled layer (still above DEFAULT_CONFIG).

Lookup order within the global folder, first match wins: .gsloth.config.json -> .gsloth.config.jsonc -> .gsloth.config.js -> .gsloth.config.mjs

Absence of every variant is a no-op: returns undefined so behaviour is unchanged.

NOTE: secrets (API keys) may live in this file; this function must never log its contents. Only non-sensitive diagnostics (the resolved path / parse failure) are emitted.

CFG-56 — identityProfile relocates the lookup to ~/.gsloth/.gsloth-settings/<name>/ and globalOnly scopes the profile names this layer refers to. Both are set ONLY for a --global run; see globalLayerProfile.

boolean

string

Promise<Partial<RawGthConfig> | undefined>

The raw global config object, or undefined when no global config exists.