config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config reads and writes syntropy's per-user config file, ~/.syntropy/config.yaml. It's the persisted counterpart to the interactive choices `syntropy setup` walks a user through (ADR-0051): which runner and model to use by default when a spec doesn't pin its own.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path(home string) string

Path returns the config file location under the given home directory.

func Save

func Save(home string, cfg Config) error

Save writes cfg to the config file, creating ~/.syntropy if needed and overwriting any existing file.

Types

type Config

type Config struct {
	// Runner is the default coding-agent runner name (see runner.Registry),
	// e.g. "claude". Empty means no default has been set yet.
	Runner string `yaml:"runner"`
	// Model is the default model override passed to the runner, e.g.
	// "claude-sonnet-5". Empty means the runner's own default.
	Model string `yaml:"model"`
}

Config is the on-disk shape of ~/.syntropy/config.yaml.

func Load

func Load(home string) (Config, error)

Load reads the config file. A missing file is not an error — it returns the zero value, since a user who hasn't run `syntropy setup` yet simply has no persisted defaults.

Jump to

Keyboard shortcuts

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