feat: interactive setup wizard for first-run and netssh configure
Release / release (push) Successful in 1m36s
Release / release (push) Successful in 1m36s
- Auto-detects missing config (netbox.url empty) and launches wizard - `netssh configure` re-runs the wizard anytime to change settings - 3-page huh form: NetBox connection, SSH defaults, resolver & cache - Saves to ~/.config/netssh.yaml (permissions 0600) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,15 @@ type SSHConfig struct {
|
||||
DefaultUser string `mapstructure:"default_user"`
|
||||
}
|
||||
|
||||
// Path returns the canonical config file path.
|
||||
func Path() string {
|
||||
configDir, err := os.UserConfigDir()
|
||||
if err != nil {
|
||||
configDir = filepath.Join(os.Getenv("HOME"), ".config")
|
||||
}
|
||||
return filepath.Join(configDir, "netssh.yaml")
|
||||
}
|
||||
|
||||
func Load() (*Config, error) {
|
||||
v := viper.New()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user