cli

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package cli builds the cobra command tree — the curated, stable UX surface.

Index

Constants

View Source
const (
	ExitOK         = 0
	ExitGeneric    = 1
	ExitAuthConfig = 2
	ExitNotFound   = 3
	ExitAPIServer  = 4
	ExitTaskFailed = 5
	ExitValidation = 6
)

Exit codes (documented contract). Scripts may rely on these.

Variables

This section is empty.

Functions

func Execute

func Execute() int

Execute runs the root command and maps errors to exit codes. Before handing off to cobra, it checks whether the invocation targets an external plugin (pc-<name>) and, if so, dispatches to it. Built-in commands take precedence.

func ExitCodeFor

func ExitCodeFor(err error) int

ExitCodeFor maps an error to its process exit code.

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd assembles the full command tree.

Types

This section is empty.

Jump to

Keyboard shortcuts

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