commands

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package commands shapes the CLI command tree and defines shared contracts for handwritten features. Application assembly owns configuration order.

Index

Constants

View Source
const LocalUtilityGlobalHelp = `
{{$bin := or (index .Root.Metadata "help-invocation") "openai"}}Global option details: {{$bin}} --help
`

LocalUtilityGlobalHelp points local-command help back to global options.

View Source
const LocalUtilityMetadata = "openai-local-utility"

LocalUtilityMetadata marks registered commands that bypass remote setup.

Variables

This section is empty.

Functions

func CloneResourceCommand

func CloneResourceCommand(source *cli.Command) *cli.Command

CloneResourceCommand keeps separate nodes and metadata for canonical and compatibility paths. Flags and actions retain their generated definitions; only the selected route is parsed during a CLI invocation.

func ConfigurePresentation

func ConfigurePresentation(root *cli.Command)

ConfigurePresentation annotates command groups for help without replacing generated categories or authored descriptions.

func ConfigureSubgroups

func ConfigureSubgroups(root *cli.Command)

ConfigureSubgroups adds real command groups from the generated resource names. Run after feature decoration and before cli.Run: command nodes acquire mutable parent/parser state when the framework initializes them.

func ConfigureTasks

func ConfigureTasks(root *cli.Command)

ConfigureTasks reuses decorated API handlers for task routes. Install before help and parsing, so each invocation gets its own command nodes and displayed path.

func MarkCompatibilityCommand

func MarkCompatibilityCommand(command *cli.Command)

MarkCompatibilityCommand hides a legacy route while keeping it available to parsing and command recovery.

func ResourceName

func ResourceName(command *cli.Command) string

ResourceName identifies the generated resource behind a selected route.

Types

type LocalError

type LocalError struct {
	Message string
	Cause   error
}

LocalError exposes only authored guidance. Message must not contain rejected values, paths, configuration, or launcher diagnostics. Cause preserves failure identity without adding its text to the displayed message.

func (*LocalError) Error

func (e *LocalError) Error() string

func (*LocalError) Unwrap

func (e *LocalError) Unwrap() error

Directories

Path Synopsis
Package files owns handwritten file workflows and their result presentation.
Package files owns handwritten file workflows and their result presentation.

Jump to

Keyboard shortcuts

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