cli

package
v0.2.4 Latest Latest
Warning

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

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

Documentation

Overview

Package cli is a reusable toolbox that turns any single CLI binary into a codefly tool. It runs the binary through a RunnerEnvironment — so the binary is provisioned and sandboxed by the environment (Nix pulls it from the workspace flake; Docker from an image; Native uses PATH) rather than being a hard system dependency — captures its output, and compresses it through the gortk filter catalog before returning it to the model.

This is the answer to "how does a CLI toolbox get its dependency": it doesn't bundle one; it asks the environment to provide it. One instance wraps one binary (e.g. terraform, kubectl, helm), matching how `gh`/`git`/etc. each get their own canonical owner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Toolbox

type Toolbox struct {
	*registry.Base
	// contains filtered or unexported fields
}

Toolbox wraps one CLI binary, executed via the given RunnerEnvironment.

func New

func New(env runners.RunnerEnvironment, bin, version string) *Toolbox

New wraps `bin`, running it through env. The caller constructs and Init's the environment (Native/Nix/Docker), which decides how `bin` is provisioned.

func (*Toolbox) Identity

func (*Toolbox) Tools

func (t *Toolbox) Tools() []*registry.ToolDefinition

Directories

Path Synopsis
cmd
cli-toolbox command
Command cli-toolbox is the standalone binary form of the reusable single-CLI toolbox.
Command cli-toolbox is the standalone binary form of the reusable single-CLI toolbox.

Jump to

Keyboard shortcuts

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