config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigPath added in v0.4.1

func GetConfigPath() string

GetConfigPath returns the path to the config file

func GetDataDir

func GetDataDir() string

GetDataDir returns the path to the data directory

func GetMetaPath

func GetMetaPath() string

GetMetaPath returns the path to the global metadata file

func Save

func Save(cfg *Config) error

Save saves configuration to file

Types

type Config

type Config struct {
	GlobalExcludes []string    `yaml:"global_excludes,omitempty"`
	Roots          []Root      `yaml:"roots"`
	Editor         string      `yaml:"editor"`
	Scan           *ScanConfig `yaml:"scan,omitempty"`
	LLM            *LLMConfig  `yaml:"llm,omitempty"`
	List           *ListConfig `yaml:"list,omitempty"`
}

Config represents the rog configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a default configuration

func Load

func Load() (*Config, error)

Load loads configuration from file with environment variable overrides

type LLMConfig

type LLMConfig struct {
	Endpoint          string `yaml:"endpoint"`
	Model             string `yaml:"model"`
	APIKey            string `yaml:"api_key,omitempty"`
	ExtraInstructions string `yaml:"extra_instructions,omitempty"`
}

LLMConfig represents LLM configuration

type ListConfig

type ListConfig struct {
	DefaultFields []string `yaml:"default_fields,omitempty"`
}

ListConfig represents list command configuration

type Root

type Root struct {
	Name      string   `yaml:"name"`
	Path      string   `yaml:"path"`
	MaxDepth  int      `yaml:"max_depth"`
	Exclude   []string `yaml:"exclude,omitempty"`
	WSL       bool     `yaml:"wsl,omitempty"`        // True if this root is in WSL
	WSLDistro string   `yaml:"wsl_distro,omitempty"` // WSL distro name (e.g., "Ubuntu")
}

Root represents a search root configuration

type ScanConfig added in v0.4.0

type ScanConfig struct {
	Progress string `yaml:"progress,omitempty"`
}

ScanConfig represents scan command configuration

Jump to

Keyboard shortcuts

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