config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 6 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: os.UserConfigDir honors XDG_CONFIG_HOME on Unix (typically ~/.config/respex/config.toml), %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"`
	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"`
	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