clireflect

package
v0.2026268.2152 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Package clireflect (github.com/opencharly/spec/clireflect, #55 import-purity) holds the Kong→CLIModel reflection mechanism: the single implementation of the command-tree reflection that produces the CUE-generated spec.CLIModel contract. It lives in spec — not the sdk root — so that charly core (the host CLI) and every command plugin emit the same contract without either importing the other, and without dragging kong into the cuelang-bearing spec/climodel slice (Rule 2: each heavy third-party dep lives only in the slice that needs it). alecthomas/kong is contained here; consumers that need only CUE validation (spec/climodel) never pull kong, and consumers that need only CLI reflection never pull cuelang.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCLIModel

func BuildCLIModel(root any, name, version, prefix string, options ...kong.Option) (*spec.CLIModel, error)

BuildCLIModel reflects a Kong command tree into the generated #CLIModel. Prefix is a dotted command path prepended to every leaf (for example "agent" when a command plugin reflects only its owned subtree).

func KongLeafToCLILeaf

func KongLeafToCLILeaf(leaf *kong.Node) spec.CLILeaf

KongLeafToCLILeaf converts one Kong leaf into the generated wire shape.

Types

This section is empty.

Jump to

Keyboard shortcuts

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