Documentation
¶
Overview ¶
Package cmdinfo collects structured information about CLI commands for kvx-powered discovery and exploration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandInfo ¶
type CommandInfo struct {
Name string `json:"name" yaml:"name" doc:"Full command path including root" maxLength:"256" example:"mycli run solution"`
Short string `json:"short" yaml:"short" doc:"Short description" maxLength:"512" example:"Run a solution workflow"`
Group string `json:"group" yaml:"group" doc:"Command group" maxLength:"64" example:"core"`
Aliases []string `json:"aliases,omitempty" yaml:"aliases,omitempty" doc:"Command aliases" maxItems:"10"`
Deprecated bool `json:"deprecated,omitempty" yaml:"deprecated,omitempty" doc:"Whether the command is deprecated"`
HasChildren bool `json:"hasChildren,omitempty" yaml:"hasChildren,omitempty" doc:"Whether the command has subcommands"`
FlagCount int `json:"flagCount" yaml:"flagCount" doc:"Number of flags" minimum:"0" maximum:"1000" example:"8"`
}
CommandInfo holds structured metadata about a single CLI command.
func CollectCommands ¶
func CollectCommands(root *cobra.Command, leafOnly bool) []CommandInfo
CollectCommands walks a Cobra command tree and returns structured info about all available commands. If leafOnly is true, only commands without children are returned (the actionable commands).
Click to show internal directories.
Click to hide internal directories.