userconfig

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package userconfig manages persistent user configuration stored in ~/.manque-ai/config.yaml

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear() error

Clear removes the config file

func ConfigPath

func ConfigPath() (string, error)

ConfigPath returns the full path to the config file

Types

type UserConfig

type UserConfig struct {
	Provider string `yaml:"provider,omitempty"`
	APIKey   string `yaml:"api_key,omitempty"`
	Model    string `yaml:"model,omitempty"`
}

UserConfig holds user-specific configuration

func Load

func Load() (*UserConfig, error)

Load reads the config from ~/.manque-ai/config.yaml

func (*UserConfig) MaskedAPIKey

func (c *UserConfig) MaskedAPIKey() string

MaskedAPIKey returns the API key with most characters masked

func (*UserConfig) Save

func (c *UserConfig) Save() error

Save writes the config to ~/.manque-ai/config.yaml

func (*UserConfig) Set

func (c *UserConfig) Set(key, value string) error

Set updates a single config value

Jump to

Keyboard shortcuts

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