config

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigNotFound = errors.New("configuration file not found in current or parent directories")

ErrConfigNotFound is returned when the target configuration file cannot be found in the current directory or any parent directories.

Functions

func FindProjectConfig added in v0.35.0

func FindProjectConfig(startDir, filename string) (configPath string, configDir string, err error)

FindProjectConfig walks upwards from the startDir looking for the specified filename. Returns the absolute path to the file, its parent directory, and any error encountered.

func LocalConfigDir added in v0.34.0

func LocalConfigDir() string

LocalConfigDir returns the directory for machine-local devx configuration.

func LocalConfigPath added in v0.34.0

func LocalConfigPath() string

LocalConfigPath returns the full path to the local config file.

func SaveLocal added in v0.34.0

func SaveLocal(cfg *LocalConfig) error

SaveLocal writes the machine-local config to ~/.devx/config.yaml. It creates the directory if it doesn't exist.

Types

type Config

type Config struct {
	DevName     string
	DevHostname string
	CFDomain    string
	TunnelName  string
	TunnelToken string
	TunnelUUID  string
}

Config holds all runtime configuration derived from secrets + defaults.

func New

func New(devName, hostname, tunnelName, domain string) *Config

func (*Config) Validate

func (c *Config) Validate() error

type LocalConfig added in v0.34.0

type LocalConfig struct {
	// Provider is the VM backend to use. Values: "auto", "podman", "lima",
	// "colima", "docker", "orbstack". Empty defaults to "auto".
	Provider string `yaml:"provider,omitempty"`
}

LocalConfig holds machine-local devx configuration that is NOT committed to version control. It lives at ~/.devx/config.yaml and provides overrides for project-level devx.yaml settings (e.g. which VM provider to use).

func LoadLocal added in v0.34.0

func LoadLocal() (*LocalConfig, error)

LoadLocal reads the machine-local config from ~/.devx/config.yaml. If the file doesn't exist, it returns a zero-value config (no error).

Jump to

Keyboard shortcuts

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