Help us shape the future of Go! Take the 2026 Go Developer Survey

commands

package
v1.47.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: Apache-2.0 Imports: 6 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 OrderImages added in v1.39.1

func OrderImages(root *cli.Command)

OrderImages keeps image help and completion candidates in the same task-oriented order. The command objects retain their generated handlers, flags and aliases.

func RemoveFineTuningCommands added in v1.42.1

func RemoveFineTuningCommands(root *cli.Command)

RemoveFineTuningCommands removes both generated aliases and the nested group. Run it after feature registration, before help and command indexes are built.

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 admin owns admin credential requirements and secure interactive setup.
Package admin owns admin credential requirements and secure interactive setup.
Package audio owns speech controls, local audio history commands, voice creation, and transcript/speech response handling.
Package audio owns speech controls, local audio history commands, voice creation, and transcript/speech response handling.
Package files owns handwritten file workflows and their result presentation.
Package files owns handwritten file workflows and their result presentation.
Package images owns handwritten image workflows, saving, previews, and picker state.
Package images owns handwritten image workflows, saving, previews, and picker state.
Package models owns model-list selection and interactive presentation.
Package models owns model-list selection and interactive presentation.
Package webhooks owns guided webhook creation and webhook result guidance.
Package webhooks owns guided webhook creation and webhook result guidance.

Jump to

Keyboard shortcuts

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