config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CredentialsPath added in v0.2.3

func CredentialsPath() string

func GlobalDir

func GlobalDir() string

func GlobalPath

func GlobalPath() string

func RepoPath

func RepoPath(repoRoot string) string

func Save

func Save(cfg *Config, path string) error

func SaveCredentials added in v0.2.3

func SaveCredentials(c *Credentials) error

Types

type ApprovalConfig

type ApprovalConfig struct {
	TextGeneration  string `json:"textGeneration"`
	PatchGeneration string `json:"patchGeneration"`
	FileWrite       string `json:"fileWrite"`
	GitExecution    string `json:"gitExecution"`
	Shell           string `json:"shell"`
}

type Config

type Config struct {
	DefaultBase string           `json:"defaultBase"`
	SyncMode    string           `json:"syncMode"`
	AutoStash   bool             `json:"autoStash"`
	Provider    string           `json:"provider"`
	Models      Models           `json:"models"`
	TestCommand string           `json:"testCommand"`
	LintCommand string           `json:"lintCommand"`
	Approval    ApprovalConfig   `json:"approval"`
	Guardrails  GuardrailsConfig `json:"guardrails"`
	Privacy     PrivacyConfig    `json:"privacy"`
	Schedule    ScheduleConfig   `json:"schedule"`
}

func Default

func Default() *Config

func Load

func Load(repoRoot string) (*Config, error)

func (*Config) IsHighRiskFile

func (c *Config) IsHighRiskFile(path string) bool

type Credentials added in v0.2.3

type Credentials struct {
	Anthropic string `json:"anthropic_api_key,omitempty"`
	OpenAI    string `json:"openai_api_key,omitempty"`
	Groq      string `json:"groq_api_key,omitempty"`
}

func LoadCredentials added in v0.2.3

func LoadCredentials() (*Credentials, error)

func (*Credentials) Set added in v0.2.3

func (c *Credentials) Set(provider, key string)

type GuardrailsConfig

type GuardrailsConfig struct {
	MaxLoopSteps                int      `json:"maxLoopSteps"`
	MinConfidenceToApply        float64  `json:"minConfidenceToApply"`
	AlwaysRunTestsAfterConflict bool     `json:"alwaysRunTestsAfterConflict"`
	WarnOnHighRiskFiles         bool     `json:"warnOnHighRiskFiles"`
	HighRiskPatterns            []string `json:"highRiskPatterns"`
}

type Models

type Models struct {
	Planning string `json:"planning"`
	Drafting string `json:"drafting"`
	Fallback string `json:"fallback"`
}

type PrivacyConfig

type PrivacyConfig struct {
	Mode          string `json:"mode"`
	RedactSecrets bool   `json:"redactSecrets"`
}

type ScheduleConfig added in v0.3.0

type ScheduleConfig struct {
	Enabled    bool     `json:"enabled"`
	Time       string   `json:"time"`
	Timezone   string   `json:"timezone"`
	Repos      []string `json:"repos"`
	OnConflict string   `json:"onConflict"`
	Notify     string   `json:"notify"`
}

Jump to

Keyboard shortcuts

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