cli

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApplyCommand

func NewApplyCommand() *cobra.Command

NewApplyCommand returns the 'apply' command for the CLI.

func NewApplyCommandWithContext

func NewApplyCommandWithContext(ctx *Context) *cobra.Command

NewApplyCommandWithContext returns the 'apply' command with the specified context.

func NewInitCommand

func NewInitCommand() *cobra.Command

NewInitCommand returns the 'init' command with a nil context. It initializes the default agent-sync project structure.

func NewInitCommandWithContext

func NewInitCommandWithContext(ctx *Context) *cobra.Command

NewInitCommandWithContext returns the 'init' command with the specified context.

func SetupCommands

func SetupCommands(rootCmd *cobra.Command, ctx *Context)

SetupCommands registers all commands with the root command and provides them with context. This function wires up the command handlers with the shared CLI context.

Types

type Context

type Context struct {
	// Logger is used for internal logging (debug, error tracking)
	Logger *zap.Logger

	// Output is used for user-facing console output
	Output log.OutputWriter
}

Context holds shared resources and configuration for CLI commands. It provides consistent access to logging and output facilities.

Jump to

Keyboard shortcuts

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