config

package
v0.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GlobalPath

func GlobalPath() (string, error)

GlobalPath returns the user-level config path. XDG_CONFIG_HOME is honored when set (including on macOS); otherwise os.UserConfigDir is used, which gives %AppData% on Windows and ~/Library/Application Support on macOS.

Types

type Agent

type Agent struct {
	Command  []string `toml:"command"`
	Delivery string   `toml:"delivery"`
	Env      []string `toml:"env"`
}

Agent configures how prompts reach the agent process. Empty array/string means "not set" — later files cannot unset earlier values.

type Config

type Config struct {
	Spec         string        `toml:"spec"`
	SpecFiles    []string      `toml:"spec_files"`
	Editor       []string      `toml:"editor"`
	Pager        []string      `toml:"pager"`
	AgentTimeout time.Duration `toml:"-"`
	Agent        Agent         `toml:"agent"`
	Prompts      Prompts       `toml:"prompts"`
}

Config is the root configuration schema: spec file, agent settings, and prompt overrides.

func Defaults

func Defaults() Config

Defaults returns the built-in configuration.

func Load

func Load(globalPath, projectPath string) (Config, error)

Load merges global (optional) then project (optional) files over Defaults: top-level keys from later files win; [agent]/[prompts] keys merge individually; arrays replace wholesale. Missing files are skipped. An empty array/string means "not set" — later files cannot unset earlier values. Unknown keys are a parse error.

type Prompts

type Prompts struct {
	Draft    string `toml:"draft"`
	Baseline string `toml:"baseline"`
	Refine   string `toml:"refine"`
	Apply    string `toml:"apply"`
}

Prompts holds per-stage prompt overrides. Empty string means "not set" — later files cannot unset earlier values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL