Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyEnv ¶
func ApplyEnv(c *CellConfig, getenv func(string) string)
ApplyEnv overrides scalar fields from environment variables.
Types ¶
type CellConfig ¶
type CellConfig struct {
Cell CellSection
Env map[string]string
Volumes []VolumeMount
Packages PackagesSection
Models ModelsSection `toml:"models"`
}
CellConfig is the merged configuration from all TOML layers.
func LoadFile ¶
func LoadFile(path string) (CellConfig, error)
LoadFile parses a TOML file into CellConfig. Returns zero value + nil error if the file does not exist.
func LoadFromOS ¶
func LoadFromOS(configDir, cwd string) CellConfig
LoadFromOS loads the layered config using real XDG paths and os.Getenv.
func LoadLayered ¶
func LoadLayered(globalPath, projectPath string, getenv func(string) string) CellConfig
LoadLayered loads global + project files, merges them, then applies env overrides.
func Merge ¶
func Merge(global, project CellConfig) CellConfig
Merge returns a new CellConfig with project overriding global for scalars; Env maps and Volumes slices are accumulated (project wins on key conflict).
type CellSection ¶
CellSection holds [cell] config.
type LLMProvider ¶ added in v0.2.0
LLMProvider holds a single provider entry under [models.providers.<name>].
type ModelsSection ¶ added in v0.2.0
type ModelsSection struct {
Default string `toml:"default"`
Providers map[string]LLMProvider `toml:"providers"`
}
ModelsSection holds [models] config — generic LLM provider/model declarations denormalized into agent-specific config files (opencode.json, etc.) at scaffold time.
type PackagesSection ¶
type PackagesSection struct {
Npm map[string]string `toml:"npm"`
Python map[string]string `toml:"python"`
}
PackagesSection holds [packages] config for npm and python tools.
type VolumeMount ¶
type VolumeMount struct {
Mount string `toml:"mount"`
}
VolumeMount holds a single [[volumes]] entry.