config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WarnWriter io.Writer = os.Stderr

WarnWriter is the destination for config warnings (e.g. unknown fields). It defaults to os.Stderr but can be overridden in tests.

Functions

func RegisterFlags

func RegisterFlags(cmd *cobra.Command)

RegisterFlags declares persistent CLI flags on the given command. Called by cmd/root.go — no Viper dependency is exposed.

Types

type AIConfig

type AIConfig struct {
	Provider string `yaml:"provider" mapstructure:"provider"`
	Model    string `yaml:"model" mapstructure:"model"`
	APIKey   string `yaml:"api_key" mapstructure:"api_key"`
}

type AngelaConfig

type AngelaConfig struct {
	Mode      string `yaml:"mode" mapstructure:"mode"`
	MaxTokens int    `yaml:"max_tokens" mapstructure:"max_tokens"`
}

type Config

type Config struct {
	AI        AIConfig        `yaml:"ai"`
	Angela    AngelaConfig    `yaml:"angela"`
	Templates TemplatesConfig `yaml:"templates"`
	Hooks     HooksConfig     `yaml:"hooks"`
	Output    OutputConfig    `yaml:"output"`
}

func Load

func Load() (*Config, error)

Load is a convenience wrapper that loads config from the current working directory.

func LoadFromDir

func LoadFromDir(dir string) (*Config, error)

LoadFromDir loads configuration from a specific directory.

func LoadFromDirWithFlags

func LoadFromDirWithFlags(dir string, cmd *cobra.Command) (*Config, error)

LoadFromDirWithFlags loads config with the full cascade including CLI flag overrides. Called by cmd/root.go in PersistentPreRunE after RegisterFlags.

type HooksConfig

type HooksConfig struct {
	PostCommit bool `yaml:"post_commit" mapstructure:"post_commit"`
}

type OutputConfig

type OutputConfig struct {
	Dir    string `yaml:"dir" mapstructure:"dir"`
	Format string `yaml:"format" mapstructure:"format"`
}

type TemplatesConfig

type TemplatesConfig struct {
	Dir string `yaml:"dir" mapstructure:"dir"`
}

Jump to

Keyboard shortcuts

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