onboard

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package onboard implements the lango onboard command — a guided 5-step wizard.

Index

Constants

This section is empty.

Variables

View Source
var WizardSteps = []StepDef{
	{Name: "Provider Setup"},
	{Name: "Agent Config"},
	{Name: "Channel Setup"},
	{Name: "Security & Auth"},
	{Name: "Test Configuration"},
}

WizardSteps is the ordered list of wizard step definitions.

Functions

func NewAgentStepForm

func NewAgentStepForm(cfg *config.Config) *tuicore.FormModel

NewAgentStepForm creates the Step 2 form: Agent Config.

func NewChannelStepForm

func NewChannelStepForm(channel string, cfg *config.Config) *tuicore.FormModel

NewChannelStepForm creates the Step 3 form for the given channel type.

func NewCommand

func NewCommand() *cobra.Command

NewCommand creates the onboard command.

func NewProviderStepForm

func NewProviderStepForm(cfg *config.Config) *tuicore.FormModel

NewProviderStepForm creates the Step 1 form: Provider Setup.

func NewSecurityStepForm

func NewSecurityStepForm(cfg *config.Config) *tuicore.FormModel

NewSecurityStepForm creates the Step 4 form: Security & Auth.

Types

type StepDef

type StepDef struct {
	Name string
}

StepDef describes a wizard step for display purposes.

type TestResult

type TestResult struct {
	Name    string
	Status  string // "pass", "warn", "fail"
	Message string
}

TestResult represents a single configuration validation result.

func RunConfigTests

func RunConfigTests(cfg *config.Config) []TestResult

RunConfigTests validates the configuration and returns test results.

type Wizard

type Wizard struct {

	// Public status
	Completed bool
	Cancelled bool
	// contains filtered or unexported fields
}

Wizard is the main bubbletea model for the 5-step onboard wizard.

func NewWizard

func NewWizard(cfg *config.Config) *Wizard

NewWizard creates a new 5-step onboard wizard.

func (*Wizard) Config

func (w *Wizard) Config() *config.Config

Config returns the current configuration.

func (*Wizard) Init

func (w *Wizard) Init() tea.Cmd

Init implements tea.Model.

func (*Wizard) Update

func (w *Wizard) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*Wizard) View

func (w *Wizard) View() string

View implements tea.Model.

type WizardStep

type WizardStep int

WizardStep represents the current step in the wizard.

const (
	StepProvider WizardStep = iota // Step 1
	StepAgent                      // Step 2
	StepChannel                    // Step 3
	StepSecurity                   // Step 4
	StepTest                       // Step 5
	StepComplete
)

Jump to

Keyboard shortcuts

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