wizard

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package wizard implements the interactive `hlab vm create` flow described in docs/wizard.md. It discovers infrastructure from Proxmox and asks only what cannot be inferred, grouped into a few thematic screens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProvisionOptions

func ProvisionOptions(formTheme *huh.Theme, cur []string, dotfilesConfigured bool) ([]string, error)

ProvisionOptions asks which software to install (dotfiles included as an ordinary catalog entry when a dotfiles repo is configured). It is the provisioning-phase counterpart of the create wizard, reused by `hlab vm provision`. The current selection pre-selects the prompt so re-provisioning remembers the previous choice.

Types

type Result

type Result struct {
	VM       *state.VMSpec
	Password string // cloud-init password, empty if SSH-only
}

Result is the outcome of the wizard.

func Run

func Run(cfg *config.Config, pm *proxmox.Client, suggestedIP string) (*Result, error)

Run drives the full VM-creation wizard. pm is used for live discovery. suggestedIP, when set, pre-fills the static IP field (CIDR included).

func RunCT

func RunCT(cfg *config.Config, pm *proxmox.Client, suggestedIP string) (*Result, error)

RunCT drives the interactive LXC container-creation flow. It mirrors Run but uses container templates (vztmpl), the LXC plan catalog, container-only options (unprivileged/nesting/swap) and a root login. The guest type is already LXC (the caller is `hlab ct create`), so there is no VM-vs-LXC screen here.

Jump to

Keyboard shortcuts

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