cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package cli builds the Cobra command tree. Bare invocation routes to the TUI; subcommands wire into the application verbs.

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.0.1-dev"

Version is overwritten at build time via -ldflags "-X github.com/nixrajput/siphon/internal/cli.Version=..."

Functions

func Execute

func Execute() int

Execute runs the root command using stdout/stderr and returns the POSIX exit code. It is the only function main() calls.

If the verb returns a typed *errs.Error, Execute reports its Code via the exit-code taxonomy (§4.2 of the spec). Untyped errors fall back to CodeUser (1).

func Heartbeat

func Heartbeat(out io.Writer, ch <-chan jobs.Event) error

Heartbeat consumes a job Event channel and prints CLI-friendly lines to out. It returns the job's terminal error (nil on success) so callers can propagate failures to the process exit code.

func NewRoot

func NewRoot(out, err io.Writer) *cobra.Command

NewRoot builds a fresh root command. Out and Err allow tests to capture output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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