config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key string) string

GetEnv retrieves an environment variable with Octrafic prefix

func GetEnvVarName

func GetEnvVarName(key string) string

GetEnvVarName returns the environment variable name for a config key

func IsFirstLaunch

func IsFirstLaunch() (bool, error)

IsFirstLaunch checks if this is the first launch (no config or not onboarded)

Types

type Config

type Config struct {
	Provider  string `json:"provider"`
	APIKey    string `json:"api_key"`
	Model     string `json:"model"`
	Onboarded bool   `json:"onboarded"`
}

Config holds the application configuration

func Load

func Load() (*Config, error)

Load loads the configuration from disk

func (*Config) Save

func (c *Config) Save() error

Save saves the configuration to disk

Jump to

Keyboard shortcuts

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