cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 23 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 implements the cobra commands of the repsol binary. The commands are thin: they parse flags, resolve the output format, and call the use cases in internal/app.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the released version of the binary.
	Version = "dev"
	// Commit is the git commit the binary was built from.
	Commit string
	// Date is the build date.
	Date string
)

The build metadata. The release build sets Commit and Date and overrides Version through -ldflags.

Functions

func Main

func Main() int

Main runs the CLI on the real process streams and returns its exit code. It stops the run on SIGINT or SIGTERM.

func Run

func Run(ctx context.Context, args []string, sys System) int

Run executes one CLI invocation and returns its exit code. Every failure is printed to sys.Err as an error envelope, and the exit code follows the category of the error.

Types

type System

type System struct {
	// In is the standard input.
	In io.Reader
	// Out is the standard output, which carries data only.
	Out io.Writer
	// Err is the standard error, which carries errors, hints and prompts.
	Err io.Writer
	// InTTY reports whether In is a terminal.
	InTTY bool
	// OutTTY reports whether Out is a terminal.
	OutTTY bool
	// Getenv reads an environment variable.
	Getenv func(string) string
	// ReadPassword reads a secret from the terminal without echoing it.
	ReadPassword func() (string, error)
}

System is the process surface the CLI runs on. It is explicit so the testscript harness can run the real entry point in-process with the streams, the terminal state and the environment it needs.

Directories

Path Synopsis
Package skills holds the agent-facing skill documents the CLI ships and serves with "repsol skills".
Package skills holds the agent-facing skill documents the CLI ships and serves with "repsol skills".

Jump to

Keyboard shortcuts

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