app

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigPath

func DefaultConfigPath() (string, error)

func SaveConfig

func SaveConfig(path string, cfg Config, language string) error

func ShouldUseInteractive

func ShouldUseInteractive(args []string, interactive bool) bool

func ValidateConfig

func ValidateConfig(cfg Config) error

Types

type Config

type Config struct {
	Language string         `json:"language,omitempty"`
	Time     timequery.Spec `json:"time,omitempty"`

	Format     string `json:"format,omitempty"`
	OutputFile string `json:"output,omitempty"`

	RepoPath  string `json:"repo,omitempty"`
	ReposPath string `json:"repos,omitempty"`

	Provider string `json:"provider,omitempty"`
	BaseURL  string `json:"base_url,omitempty"`
	APIKey   string `json:"api_key,omitempty"`
	Model    string `json:"model,omitempty"`
	Author   string `json:"author,omitempty"`
	Prompt   string `json:"prompt,omitempty"`

	Interactive bool   `json:"interactive,omitempty"`
	ConfigPath  string `json:"-"`
	NoConfig    bool   `json:"-"`
}

Config is the unified runtime configuration.

func DefaultConfig

func DefaultConfig() Config

func LoadConfig

func LoadConfig(path, language string) (Config, error)

func MergeConfig

func MergeConfig(base, fileCfg, cliCfg Config, changed map[string]bool) Config

func NormalizeConfigPaths added in v0.1.2

func NormalizeConfigPaths(cfg Config) (Config, error)

func RunBaseConfigWizard added in v0.1.4

func RunBaseConfigWizard(in io.Reader, out io.Writer, language string) (Config, error)

func RunWizard

func RunWizard(in io.Reader, out io.Writer, base Config) (Config, error)

type Service

type Service struct {
	Stdout io.Writer
	Stderr io.Writer
}

func NewService

func NewService(stdout, stderr io.Writer) *Service

func (*Service) Run

func (s *Service) Run(cfg Config) error

Jump to

Keyboard shortcuts

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