setupcmd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SetupCmd = cobra.Command{
		Use:   "setup",
		Short: "Interactive setup for Mithril configuration",
		Run: func(cmd *cobra.Command, args []string) {
			runSetup()
		},
	}

	DoctorCmd = cobra.Command{
		Use:   "doctor",
		Short: "Check system health and configuration",
		Run: func(cmd *cobra.Command, args []string) {
			if migrateFlag {
				runMigrate()
				return
			}
			runDoctor()
		},
	}
)

Functions

func MigrateConfig

func MigrateConfig(configPath string) bool

MigrateConfig checks if a config file is missing [lightbringer] or [consensus] sections and adds them. Returns true if any migration was performed.

func NewSetupModel

func NewSetupModel(configPath string) tea.Model

NewSetupModel creates a setup model for embedding in the dashboard. configPath overrides the output path (pass "" for default).

func SetupIsDone

func SetupIsDone(m tea.Model) bool

SetupIsDone returns true if the setup model has reached the done screen.

func SetupIsFirstScreen

func SetupIsFirstScreen(m tea.Model) bool

SetupIsFirstScreen returns true if the setup wizard is on the initial mode selection screen.

Types

type DiskInfo

type DiskInfo struct {
	Path   string
	Device string
	SizeGB string
	FreeGB string
	FSType string
}

DiskInfo represents a detected disk/mount

func DetectDisks

func DetectDisks() []DiskInfo

DetectDisks returns mounted filesystems with free space info.

func (DiskInfo) FormatDiskOption

func (d DiskInfo) FormatDiskOption() string

FormatDiskOption returns a display string for a disk.

Jump to

Keyboard shortcuts

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