docs

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindCommand added in v1.8.0

func FindCommand(root *cobra.Command, args []string) (*cobra.Command, error)

FindCommand resolves a command path against the provided root command.

func GenMdxTree added in v1.4.2

func GenMdxTree(cmd *cobra.Command, dir string) error

func GenYamlTree

func GenYamlTree(cmd *cobra.Command, dir string) error

Types

type Command

type Command struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Usage       string   `json:"usage"`
	Aliases     []string `json:"aliases,omitempty"`
	Examples    string   `json:"examples,omitempty"`
	Slug        string   `json:"slug,omitempty"`
	RunInWebCLI bool     `json:"runInWebCLI,omitempty"`
	CommandType string   `json:"commandType"`

	Annotations map[string]string `json:"annotations,omitempty"`

	Flags map[string][]Flag `json:"flags,omitempty"`

	SubCommands []Command `json:"subCommands,omitempty"`
}

func DescribeCommand added in v1.8.0

func DescribeCommand(cmd *cobra.Command) Command

DescribeCommand returns a machine-readable description of a command.

func (Command) ExamplesList added in v1.4.2

func (cmd Command) ExamplesList() []Example

type Example added in v1.4.2

type Example struct {
	Desc          string
	Code          string
	WebCLICommand string
}

type Flag

type Flag struct {
	Name        string `json:"name"`
	Shorthand   string `json:"shorthand,omitempty"`
	Description string `json:"description"`
	Default     string `json:"default"`
}

Jump to

Keyboard shortcuts

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