cli

package
v0.0.0-...-f03fdf5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 46 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cli is cobra wiring and nothing else.

It builds spec.Options from flags and hands them on. It never builds an argv and never decides what the sandbox may reach: isolation lives in spec and backend/oci, which is the one rule the old tree kept by convention and this one keeps by layout.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() int

Execute runs the root command and returns the process exit code.

func NewRootCmd

func NewRootCmd() *cobra.Command

NewRootCmd assembles the command tree.

func WriteReference

func WriteReference(w io.Writer) error

WriteReference writes docs/cli.md: every command of the tree NewRootCmd builds, with its usage line, its help, its examples and its flags.

It is generated rather than written because the help text is the thing users read first and the one most likely to move: a hand-kept reference drifts the first time a flag is renamed, and nobody notices until a reader types the old one. TestCLIReferenceIsCurrent fails when docs/cli.md and this output differ, so the two change in the same commit.

The Markdown is written here rather than by cobra's doc package, which would bring a man-page module into go.mod for a feature we do not use.

Long help is put in a plain text block, as the terminal shows it, not re-flowed into prose: it is written for an 80-column terminal, with indented examples and aligned lists that Markdown would re-flow or read as syntax (`<id>` as a tag, `*.example.com` as emphasis).

Types

This section is empty.

Jump to

Keyboard shortcuts

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