wizard

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StepProjectName = 0
	StepModulePath  = 1
	StepPreset      = 2
	StepModules     = 3
	StepModuleOpts  = 4
	StepOutputDepth = 5
	StepConfirm     = 6
	TotalSteps      = 7
)

Step constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ProjectName     string
	ModulePath      string
	PresetIndex     int
	SelectedModules []string
	ModuleOptions   map[string]map[string]string // module name -> option key -> value
	OutputDepth     OutputDepth
	OutputDir       string
}

type Model

type Model struct {
	Done bool

	Config Config
	// contains filtered or unexported fields
}

func NewModel

func NewModel(outputDir string, pre Prefill) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

View renders the current step

type OutputDepth

type OutputDepth int

OutputDepth describes how much boilerplate to generate

const (
	DepthMinimal OutputDepth = iota
	DepthBoilerplate
	DepthFull
)

func (OutputDepth) String

func (d OutputDepth) String() string

type Prefill

type Prefill struct {
	ProjectName string // --name / -n
	ModulePath  string // --module / -m
	PresetName  string // --preset / -p  (alias: api, worker, fullstack, minimal)
	Depth       string // --depth / -d   (alias: minimal, boilerplate, full)
}

Prefill holds values passed via CLI flags that skip wizard steps.

Jump to

Keyboard shortcuts

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