cobra

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Annotate

func Annotate(cmd *cobra.Command, meta murli.Metadata)

Annotate serializes murli Metadata and binds it to a Cobra command's Annotations map.

func BuildDescribeTree added in v0.3.0

func BuildDescribeTree(cmd *gocobra.Command) murli.DescribeCommandSchema

BuildDescribeTree recursively builds the full DescribeCommandSchema for cmd and all its visible, non-system subcommands.

func EmitSchema

func EmitSchema(cmd *gocobra.Command) error

EmitSchema extracts command metadata and flag schemas, prints JSON to Stdout, and returns nil.

func Enable

func Enable(rootCmd *gocobra.Command)

Enable injects --schema and --agent persistent flags and wraps all command RunE handlers.

func Execute

func Execute(rootCmd *gocobra.Command) error

Execute is a drop-in replacement for rootCmd.Execute().

func NewWriter

func NewWriter(cmd *cobra.Command) *murli.Writer

NewWriter returns a murli Writer configured from a Cobra command's output streams, --agent, --output, --protocol-version, --force, --yes, and --dry-run flag values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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