feat: interactive setup wizard for first-run and netssh configure
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:
Sebastian Unterschütz
2026-05-23 13:04:55 +02:00
parent 11f5319eae
commit ff9c61c087
5 changed files with 235 additions and 7 deletions
+9
View File
@@ -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()