cmd

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Types

type CommandContext

type CommandContext struct {
	Debug      bool
	LogFormat  string
	LogNoColor bool
	Logger     *slog.Logger
}

CommandContext holds cross-cutting configuration shared by all agent subcommands. It mirrors the pattern used in forge (see hack/cmd/forge/forge/cmd/common.go) but carries only the fields relevant to the agent: logging configuration.

Persistent flags are bound directly to this struct's exported fields in Run(), and Setup() is called inside each subcommand's RunE — after cobra has finished parsing — to initialise the Logger.

func (*CommandContext) Setup

func (c *CommandContext) Setup()

Setup initialises the Logger from the current flag values.

Jump to

Keyboard shortcuts

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