cli

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package cli is Ripen's command surface. Every verb answers with one Response envelope on stdout — success and failure alike — unless a read command is given --pretty, which renders the same payload as text. Pretty is never inferred from a TTY: an agent in a pty still gets the envelope. Humans get a second line on stderr when something failed; machines can ignore stderr entirely.

Exit codes are the other half of the contract: 0 success, 1 operational failure, 2 configuration or usage, and 3 read narrowly as "a human needs to look at this" — an open breaker or a failed rollback, nothing else.

Index

Constants

View Source
const (
	ExitOK        = 0
	ExitOperation = 1
	ExitUsage     = 2
	ExitAttention = 3
)

Exit codes. Three is deliberately narrow: it means the Circuit breaker is open or a rollback failed, and a person has to decide what happens next. Everything else operational is 1.

View Source
const DefaultConfigPath = "/etc/ripen/policy.yaml"

DefaultConfigPath is where Ripen looks when nothing says otherwise.

Variables

This section is empty.

Functions

func Run

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

Run executes one command and returns the process exit code.

func RunWithInput

func RunWithInput(args []string, stdin io.Reader, stdout, stderr io.Writer) int

RunWithInput is Run with an explicit input stream, which only the MCP server needs: its transport is stdin and stdout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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