cli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package cli is the agentdex command-line interface: a thin wrapper over the agentdex library and the modelsdev client. It owns the cobra command tree, the JSON envelope, the exit-code taxonomy, --fields selection, and the catalog/models.dev coverage rollup that drives get reporting. It reimplements no library behaviour; detection, resolution, the merge, and caching all live in the library, and the one piece of CLI-only policy — the coverage rollup — composes public library facts rather than reaching past the public API.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = defaultVersion
	Commit  = defaultCommit
	Date    = defaultDate
)

Version, Commit, and Date are injected at build time via ldflags into this package. The defaults make a plain `go build` self-describing as a dev build rather than printing empty fields. writeVersion fills any leftover default from debug.ReadBuildInfo so go install is not anonymous.

Functions

func Execute

func Execute() int

Execute runs the command tree and returns the process exit code. Command failures arrive as *exitError (already rendered). Cobra-originated errors are usage (exit 2) and, under --json, share the same stdout envelope as a.fail.

func NewRootCommand

func NewRootCommand() *cobra.Command

NewRootCommand builds the agentdex command tree with global flags bound. It is the single construction point so tests can drive the CLI with a fresh tree and captured output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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