Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package cli is the tailkeeper command line (spec §16). Tool commands come from the registry: `tailkeeper <area> <verb>` runs the tool with that area and verb, and its flags come from the tool's input type, so the CLI and MCP accept the same parameters and share validation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	Stdout, Stderr io.Writer
	// Build loads configuration for the named context (app.Build in production).
	Build func(ctx context.Context, contextName string) (*app.App, error)
	// Reexec replaces the process with the exec provider's wrapper; it returns only on failure.
	Reexec func(p config.Provider) error
	// ServeMCP serves srv until the client goes away (stdio in production).
	ServeMCP func(ctx context.Context, srv *mcp.Server) error
	Now      func() time.Time
}

Runner runs one command line. Its dependencies are injected for tests.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, args []string) int

Run executes args (without the program name) and returns the exit code.

Jump to

Keyboard shortcuts

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