Versions in this module Expand all Collapse all v0 v0.3.0 Nov 27, 2026 Changes in this version + const KindCheck + const KindDefinition + const KindDeps + const KindGenerated + const KindMethod + const KindOption + const KindOutput + const KindRefine + const KindTag + const KindWiring + const RenderAge + const RenderBody + const RenderBytes + const RenderDuration + const RenderDurationMs + const RenderHidden + const RenderShort + const RenderStatus + const RenderTime + const RuleDoc + const RuleFails + const RuleFlag + const RuleHandler + const RuleHelp + const RuleMethods + const RuleName + const RulePrints + const RuleRoot + const RuleSays + const RuleSecret + const RuleSubDoc + const RuleTag + const RuleUnique + const RuleValidate + const RuleVerb + const SecretHelp + const SecretsHelp + const Stdin + const SubKey + const TableBlocks + const TableSections + var Absent any = absent + var Actions = map[string]bool + var Checks = guide.Checks + var KnownTags = []string + var RootGroups = []RootGroup + var ShutdownTimeout = 10 * time.Second + var Spec = guide.Spec + var Verbs = map[string]bool + func AddCommands(g Group, cmds ...*cobra.Command) + func Attach(parent *cobra.Command, d Deps, groups ...*cobra.Command) error + func AttachLocal(root *cobra.Command, d Deps, groups ...*cobra.Command) error + func Check(ctx context.Context, in any) error + func Derive(p Printer, g Group, m Command, in any, answer []byte) error + func DescribeRoot(root *cobra.Command) + func Done(g Group, m Command, flags string) (any, []byte, bool) + func ExampleFlagProblems(examples []Example, flags map[string]bool) []string + func Fail() error + func FlagName(f reflect.StructField) string + func Flaggable(t reflect.Type) bool + func GlobalFlag(name string) bool + func GroupByArea(cmd *cobra.Command) + func InputFlags(in reflect.Type) map[string]bool + func NamedString(t reflect.Type) bool + func Now() time.Time + func Output(group Group, method string, in any, answer []byte) + func PrintsGroups(p GroupPrinter) + func Provide[D any](g *LocalGroup, fn func() D) + func ReadFile(path string) ([]byte, bool) + func Render(p Printer, name string, out any) error + func RenderTags() []string + func Report(err error) + func Run(cmd *cobra.Command, g *LocalGroup, method string, in any) error + func Scaffold(root string, group string, doc string, under Parent) ([]string, error) + func Secret(cmd *cobra.Command, name string, flag string) (secret.Value, bool) + func Secrets(_ *cobra.Command, name string, flags map[string]string) (map[string]secret.Value, bool) + func Serve(cmd *cobra.Command, g *LocalGroup, method string) error + func SetNow(t time.Time) + func SetTraceID(id string) + func Strings[T ~string](values []string) []T + func TagKeys(tag reflect.StructTag) []string + func TagProblems(t reflect.Type) []string + func TraceID() string + func WithCheck(examples []Example, c ReadBack) bool + type Choice []any + func OneOf(values ...any) Choice + type Column struct + Blocks bool + Empty string + Header string + JSON string + Label string + NoLabel bool + NoTable bool + None string + OmitEmpty bool + Prefix string + Render string + Sections bool + Type reflect.Type + func Columns(out reflect.Type) []Column + func (c Column) Format(p Printer, v any) string + func (c Column) FormatKV(p Printer, v any) string + type Command interface + CommandLong func() string + CommandName func() string + CommandShort func() string + Examples func() []Example + Input func() reflect.Type + KeyField func() string + MethodName func() string + Output func() reflect.Type + PageNotes func() string + PageResult func() string + Saying func() string + SubPath func() string + type Component interface + Start func() + Stop func(ctx context.Context) + type Deps struct + Error func(err error) + JSON func() bool + Print Printer + PrintJSON func(body []byte) + type Example struct + Checks []ReadBack + Doc string + Flags string + Logs []LogLine + Output any + type FailedError struct + func (FailedError) Error() string + type Field struct + Path string + Want any + func Fields(pathsAndWants ...any) []Field + type Group interface + CommandPath func() []string + CommandPermission func(m Command) types.Permission + Commands func() []Command + GroupDoc func() string + GroupLong func() string + GroupName func() string + GroupNotes func() string + SubDoc func(segment string) string + func Groups() []Group + func Origin(c *cobra.Command) (Group, bool) + type GroupPrinter func(g Group, method string, answer []byte) bool + type LocalGroup struct + ConfigDefaults any + ConfigPrefix string + Deps reflect.Type + Doc string + Flat bool + Long string + Methods []*LocalMethod + Name string + Parents []Parent + SubDocs map[string]string + func All() []*LocalGroup + func Define(name string, doc string, opts ...Option) *LocalGroup + func Lookup(path string) *LocalGroup + func Register(g *LocalGroup) *LocalGroup + func (g *LocalGroup) CommandPath() []string + func (g *LocalGroup) CommandPermission(_ Command) types.Permission + func (g *LocalGroup) Commands() []Command + func (g *LocalGroup) GroupDoc() string + func (g *LocalGroup) GroupLong() string + func (g *LocalGroup) GroupName() string + func (g *LocalGroup) GroupNotes() string + func (g *LocalGroup) Method(name string) *LocalMethod + func (g *LocalGroup) Path() string + func (g *LocalGroup) SubDoc(segment string) string + type LocalMethod struct + In reflect.Type + Name string + Out reflect.Type + func Method[In, Out any](name string) *LocalMethod + func Process(name string) *LocalMethod + func (m *LocalMethod) Check(command string, flags string, pathsAndWants ...any) *LocalMethod + func (m *LocalMethod) CheckFails(command string, flags string, errorText string) *LocalMethod + func (m *LocalMethod) CommandLong() string + func (m *LocalMethod) CommandName() string + func (m *LocalMethod) CommandShort() string + func (m *LocalMethod) ConfigKeys() []string + func (m *LocalMethod) Example(flags string, doc ...string) *LocalMethod + func (m *LocalMethod) Examples() []Example + func (m *LocalMethod) Fails(doc string, input any) *LocalMethod + func (m *LocalMethod) Flag(keys ...string) *LocalMethod + func (m *LocalMethod) Handle(fn any) *LocalMethod + func (m *LocalMethod) Handler() any + func (m *LocalMethod) Input() reflect.Type + func (m *LocalMethod) IsProcess() bool + func (m *LocalMethod) KeyField() string + func (m *LocalMethod) Logs(lines ...LogLine) *LocalMethod + func (m *LocalMethod) Long(text string) *LocalMethod + func (m *LocalMethod) MethodName() string + func (m *LocalMethod) NoCheck(why string) *LocalMethod + func (m *LocalMethod) Output() reflect.Type + func (m *LocalMethod) PageNotes() string + func (m *LocalMethod) PageResult() string + func (m *LocalMethod) Prints(out any) *LocalMethod + func (m *LocalMethod) Refusals() []Refusal + func (m *LocalMethod) Saying() string + func (m *LocalMethod) Says(text string) *LocalMethod + func (m *LocalMethod) Setup(fn any) *LocalMethod + func (m *LocalMethod) Short(text string) *LocalMethod + func (m *LocalMethod) Sub(segment string) *LocalMethod + func (m *LocalMethod) SubPath() string + func (m *LocalMethod) Unchecked() string + type LogLine struct + Attrs []slog.Attr + Level slog.Level + Msg string + type Option interface + func Config(prefix string, defaults any) Option + func Flat() Option + func Long(text string) Option + func SubDoc(segment string, short string) Option + func Under(words ...Parent) Option + func Uses[D any]() Option + type Parent string + const ParentAgent + const ParentController + const ParentDSL + const ParentNATS + const ParentPKI + func KnownParents() []Parent + func (Parent) Values() []Parent + func (p Parent) Valid() bool + type Printer interface + Age func(d time.Duration) string + Block func(title string, pairs ...string) + Bytes func(n int64) string + Duration func(d time.Duration) string + Heading func(title string) + KV func(pairs ...string) + Status func(word string) string + Table func(t Table) + Text func(text string) + Time func(t time.Time) string + Verdict func(text string) + type Problem struct + Fix string + Group string + Message string + Method string + Rule string + func Validate(g *LocalGroup) []Problem + func ValidateOutput() []Problem + func (p Problem) String() string + type ReadBack struct + Command string + Fails string + Fields []Field + Flags string + type Refusal struct + Doc string + Input any + type RootGroup struct + Leaf bool + Name string + Purpose string + func Root(word string) (RootGroup, bool) + type Running struct + Cleanup func(ctx context.Context) + Components []Component + func Then(r Running, fn func(ctx context.Context)) Running + type Table struct + Empty string + Headers []string + Rows [][]string + Title string + type UsageError struct + Msg string + func (e *UsageError) Error() string