config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureInteractive

func ConfigureInteractive() error

ConfigureInteractive runs interactive configuration

func GetConfigPath

func GetConfigPath() string

GetConfigPath returns the default config file path

func PromptForAPIKey

func PromptForAPIKey() (string, error)

PromptForAPIKey prompts user to enter API key interactively

func SaveAPIKey

func SaveAPIKey(apiKey string) error

SaveAPIKey saves API key to config file

func SaveConfig

func SaveConfig(cfg *Config, configPath string) error

SaveConfig saves configuration to file

func ValidateConfig

func ValidateConfig(cfg *Config) error

ValidateConfig checks if configuration is valid

Types

type Config

type Config struct {
	AI       types.APIConfig `yaml:"ai"`
	Defaults DefaultsConfig  `yaml:"defaults"`
	Filters  FiltersConfig   `yaml:"filters"`
}

Config represents the application configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns default configuration

func LoadConfig

func LoadConfig(configPath string) (*Config, error)

LoadConfig loads configuration from file with environment variable fallbacks

type DefaultsConfig

type DefaultsConfig struct {
	MaxConcurrent  int    `yaml:"max_concurrent"`
	OutputMode     string `yaml:"output_mode"`
	OutputSuffix   string `yaml:"output_suffix"`
	BackupOriginal bool   `yaml:"backup_original"`
	RemoveComments bool   `yaml:"remove_comments"`
	FilePattern    string `yaml:"file_pattern"`
}

DefaultsConfig contains default processing options

type FiltersConfig

type FiltersConfig struct {
	MaxFileSize  int64    `yaml:"max_file_size"`
	ExcludeDirs  []string `yaml:"exclude_dirs"`
	ExcludeExts  []string `yaml:"exclude_exts"`
	IncludeExts  []string `yaml:"include_exts"`
	ExcludeFiles []string `yaml:"exclude_files"`
}

FiltersConfig contains file filtering options

Jump to

Keyboard shortcuts

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