Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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
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.
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).