Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeLogging ¶ added in v0.0.4
InitializeLogging sets up logging based on command-line flags and environment variables. This function is designed to be used as the Before hook in urfave/cli applications. Behavior: - --debug acts as shorthand for --log-level=debug and --verbose (forces console + verbose) - --log-level debug without --verbose sets level internally but does not enable console unless explicitly requested elsewhere
func NewApplyCommand ¶
NewApplyCommand returns the 'apply' command for urfave/cli.
func NewInitCommand ¶
NewInitCommand returns the 'init' command for urfave/cli. It initializes the default agent-sync project structure.
func SetupCliV3Commands ¶ added in v0.0.4
SetupCliV3Commands registers all commands for the urfave/cli/v3 version and sets up the context in each command's metadata.
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
// Debug indicates whether debug shorthand was requested.
// When true, logging should be forced to debug level and console verbose enabled.
Debug bool
}
Context holds shared resources and configuration for CLI commands. It provides consistent access to logging and output facilities.
func GetSharedContext ¶ added in v0.0.4
GetSharedContext retrieves the shared context from command metadata