Versions in this module Expand all Collapse all v0 v0.1.0 Mar 18, 2026 Changes in this version + const CmdAnnotationMCPEnabled + const CommandAnnotationRootOK + const CommandGroupMeta + const CommandGroupPrimary + var ErrInvalidUsage = errors.New("invalid usage") + func DefaultCmdFactory(dryRunInfo opctx.DryRunnable, eventListener opctx.EventListener) (opctx.CmdFactory, error) + func DefaultFileSystemFactory() opctx.FileSystemFactory + func DefaultOSEnvFactory() opctx.OSEnvFactory + func ExportAsMCPTool(cmd *cobra.Command) + func NewAppDryRunnable(dryRun bool) *appDryRunnable + func NewEventListener(eventLogger *slog.Logger) (*appEventListener, error) + func RunFunc(innerFunc CmdFuncType) cobraRunFuncType + func RunFuncWithExtraArgs(innerFunc CmdWithExtraArgsFuncType) cobraRunFuncType + func RunFuncWithoutRequiredConfig(innerFunc CmdFuncType) cobraRunFuncType + func RunFuncWithoutRequiredConfigWithExtraArgs(innerFunc CmdWithExtraArgsFuncType) cobraRunFuncType + type App struct + func NewApp(fsFactory opctx.FileSystemFactory, osEnvFactory opctx.OSEnvFactory) *App + func (a *App) AddTopLevelCommand(child *cobra.Command) + func (a *App) CommandNames(ancestors ...string) ([]string, error) + func (a *App) Execute(args []string) int + func (a *App) RegisterPostInitCallback(callback PostInitCallbackFunc) + type CmdFuncType = func(env *Env) (interface{}, error) + type CmdWithExtraArgsFuncType = func(env *Env, extraArgs []string) (interface{}, error) + type ColorMode string + const ColorModeAlways + const ColorModeAuto + const ColorModeNever + func (f *ColorMode) Set(value string) error + func (f *ColorMode) String() string + func (f *ColorMode) Type() string + type Env struct + func GetEnvFromCommand(cmd *cobra.Command) (*Env, error) + func NewEnv(ctx context.Context, options EnvOptions) *Env + func (env *Env) AllPromptsAccepted() bool + func (env *Env) ColorMode() ColorMode + func (env *Env) Command(cmd *exec.Cmd) (opctx.Cmd, error) + func (env *Env) CommandInSearchPath(name string) bool + func (env *Env) Config() *projectconfig.ProjectConfig + func (env *Env) ConfirmAutoResolution(text string) bool + func (env *Env) ConstructionTime() time.Time + func (env *Env) Context() context.Context + func (env *Env) Deadline() (deadline time.Time, ok bool) + func (env *Env) DefaultReportFormat() ReportFormat + func (env *Env) Distro() (distroDef projectconfig.DistroDefinition, ...) + func (env *Env) Done() <-chan struct{} + func (env *Env) DryRun() bool + func (env *Env) Err() error + func (env *Env) Event(name string, args ...any) + func (env *Env) FS() opctx.FS + func (env *Env) LogsDir() string + func (env *Env) NetworkRetries() int + func (env *Env) OSEnv() opctx.OSEnv + func (env *Env) OutputDir() string + func (env *Env) PermissiveConfigParsing() bool + func (env *Env) ProjectDir() string + func (env *Env) PromptsAllowed() bool + func (env *Env) Quiet() bool + func (env *Env) ReportFile() io.Writer + func (env *Env) ResolveDistroRef(distroRef projectconfig.DistroReference) (distroDef projectconfig.DistroDefinition, ...) + func (env *Env) SetAcceptAllPrompts(acceptAllPrompts bool) + func (env *Env) SetColorMode(colorMode ColorMode) + func (env *Env) SetDefaultReportFormat(format ReportFormat) + func (env *Env) SetEventListener(eventListener opctx.EventListener) + func (env *Env) SetNetworkRetries(retries int) + func (env *Env) SetPermissiveConfigParsing(permissive bool) + func (env *Env) SetQuiet(quiet bool) + func (env *Env) SetReportFile(reportFile io.Writer) + func (env *Env) SetVerbose(verbose bool) + func (env *Env) StartEvent(name string, args ...any) opctx.Event + func (env *Env) Value(key any) any + func (env *Env) Verbose() bool + func (env *Env) WorkDir() string + type EnvOptions struct + Config *projectconfig.ProjectConfig + DryRunnable opctx.DryRunnable + EventListener opctx.EventListener + Interfaces SystemInterfaces + ProjectDir string + func NewEnvOptions() EnvOptions + type PostInitCallbackFunc func(app *App, env *Env) error + type ReportFormat string + const ReportFormatCSV + const ReportFormatJSON + const ReportFormatMarkdown + const ReportFormatTable + func (f *ReportFormat) Set(value string) error + func (f *ReportFormat) String() string + func (f *ReportFormat) Type() string + type SystemInterfaces struct + CmdFactory opctx.CmdFactory + FileSystemFactory opctx.FileSystemFactory + OSEnvFactory opctx.OSEnvFactory