cli

package
v0.0.0-...-4a325c4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteContext

func ExecuteContext(ctx context.Context, deps Dependencies) error

ExecuteContext builds and executes the root command with explicit dependencies.

func NewRootCommand

func NewRootCommand(deps Dependencies) *cobra.Command

NewRootCommand returns a fresh command tree and fresh configuration object. Each call is isolated so tests and embedding callers do not share state.

Types

type Dependencies

type Dependencies struct {
	In      io.Reader
	Out     io.Writer
	Err     io.Writer
	Args    []string
	Version string
	Config  *viper.Viper
	Cwd     string
	FS      afero.Fs
	Runner  Runner
}

Dependencies contains all process-bound inputs for the CLI. Keeping these explicit makes commands testable without package globals, process-global stdio, or the package-level viper singleton.

type ExecutionRequest

type ExecutionRequest = execution.ProcessRequest

ExecutionRequest is the testable process plan produced by CLI commands.

type ExecutionResult

type ExecutionResult = execution.ProcessResult

ExecutionResult captures the observable outcome of a child command.

type Runner

type Runner = execution.ProcessRunner

Runner executes a planned command in one meta repository target.

Jump to

Keyboard shortcuts

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