cli

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 44 Imported by: 0

Documentation

Overview

Package cli builds the Iris command-line surface: the cobra noun-verb command tree, the global flags, and the exit-code and --json output contracts. It sits at the top of the product import graph (nothing imports it), and cmd/iris is a thin entrypoint over Execute. Interactive full-screen views live in internal/tui; this package owns command wiring only.

Nearly every command handler is real: it resolves its target, dials the daemon over the unix socket or TCP, and maps the reply onto the contract that framed the surface from the first day -- the categorical exit codes, the single-JSON document on stdout under --json, and the strict separation of log output (stderr) from command output (stdout). A handful of read verbs are still unwired stubs (run show, engine logs, deadletter list, endpoint list/show/remove, pat list/revoke): they carry the daemonStub handler, which reports "no daemon reachable" (exit 3) with guidance to start the engine when nothing answers, and "not implemented" (exit 4) once a daemon does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(args []string, stdout, stderr io.Writer) int

Execute builds the command tree, runs it against args, and returns the process exit code (one of the exit-code categories above). It writes command output to stdout and human-readable errors to stderr, and never calls os.Exit, so it is drivable from tests. cmd/iris is a thin wrapper that passes os.Args[1:] and the process streams and exits with the returned code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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