config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Default  string             `mapstructure:"default"`
	Profiles map[string]Profile `mapstructure:"profiles"`
}

Config holds all brr configuration.

func Load

func Load() (Config, error)

Load reads config from files and returns a merged Config. Priority: .brr.yaml > ~/.config/brr/config.yaml. Returns an error if no config is found or if a config file is malformed.

func (Config) ResolveProfile

func (c Config) ResolveProfile(profileName string) ([]string, string, error)

ResolveProfile returns the command slice for the given profile name. If profileName is empty, the default profile is used.

type Profile

type Profile struct {
	Command string   `mapstructure:"command"`
	Args    []string `mapstructure:"args"`
}

Profile defines a named agent configuration.

Jump to

Keyboard shortcuts

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