cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package cli implements the agentenv command-line interface — the command registry, one-shot handlers (commands.go), long-running modes (session.go), the out-of-band socket client (ctl.go), and shared helpers (cli.go). main.go calls Run() after handling the sandbox re-exec branch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(version string) int

Run parses os.Args[1:], dispatches, and returns the exit code main should surface. It does NOT call os.Exit itself — that bypasses deferred Release() of the repo lock (and any other defers a handler set up). main() is the only place allowed to terminate the process.

Types

type ExitError

type ExitError int

ExitError is what a handler returns to ask cli.Run to exit with a specific non-zero code AFTER all deferred cleanup (notably the repo flock release) has run. cmdExec uses this to transparently propagate the inner command's status without calling os.Exit (which would bypass the defers).

func (ExitError) Error

func (e ExitError) Error() string

Jump to

Keyboard shortcuts

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