cli

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 40 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 defines the plugyard command line.

Index

Constants

View Source
const (
	ExitOK      = 0
	ExitFailure = 1 // runtime failure
	ExitUsage   = 2 // usage or validation error
)

Exit codes, as defined in docs/SPEC.md.

Variables

View Source
var AgentGuide string

AgentGuide is the guide "plugyard agents" prints: llms.txt at the root of the repository, which the main package builds in.

Functions

func Run

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

Run executes plugyard with the given arguments (without the program name) and returns the process exit code. Ctrl+C or a termination signal asks the running command to shut down in an orderly way.

func RunContext

func RunContext(ctx context.Context, args []string, stdout, stderr io.Writer) int

RunContext is Run with a caller-supplied context; cancelling it asks the running command to shut down.

Types

type UsageError

type UsageError struct{ Err error }

UsageError marks an error raised by a command as a usage or validation error, so that Run exits with ExitUsage instead of ExitFailure.

func (*UsageError) Error

func (e *UsageError) Error() string

func (*UsageError) Unwrap

func (e *UsageError) Unwrap() error

Jump to

Keyboard shortcuts

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