cli

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRootCmd

func NewRootCmd(opts Options) *cobra.Command

NewRootCmd constructs the ski CLI with all implemented subcommands.

Types

type MultiSelectRequest

type MultiSelectRequest struct {
	Title       string
	Description string
	Options     []string
	MinSelected int
	Height      int
}

MultiSelectRequest describes a CLI multi-select prompt.

type Options

type Options struct {
	Getwd             func() (string, error)
	GetHomeDir        func() (string, error)
	Stdin             io.Reader
	Stdout            io.Writer
	Stderr            io.Writer
	IsTTY             func() bool
	PromptMultiSelect func(req MultiSelectRequest) ([]string, error)
	PromptInput       func(req TextPromptRequest) (string, error)
}

Options controls filesystem, IO, and TTY dependencies for the CLI.

type TextPromptRequest

type TextPromptRequest struct {
	Title       string
	Description string
	Placeholder string
	Value       string
}

TextPromptRequest describes a CLI text input prompt.

Jump to

Keyboard shortcuts

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