cli

package
v0.0.0-...-ed2001b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

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

Run parses CLI arguments and executes the requested command using empty stdin.

func RunWithIO

func RunWithIO(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) error

RunWithIO parses CLI arguments and executes the requested command using the supplied standard streams.

Types

type HTTPFetcher

type HTTPFetcher struct {
	// contains filtered or unexported fields
}

HTTPFetcher is the CLI's default bounded HTTP(S) web fetch backend.

func NewHTTPFetcher

func NewHTTPFetcher(config HTTPFetcherConfig) *HTTPFetcher

NewHTTPFetcher returns a bounded HTTP(S) fetcher suitable for the default CLI web_fetch tool. The default policy blocks loopback, link-local, and private network addresses; command tools remain available for explicit local network checks when the user asks for them.

func (*HTTPFetcher) FetchURL

func (f *HTTPFetcher) FetchURL(ctx context.Context, req web.FetchRequest) (web.FetchResult, error)

FetchURL fetches req.URL through the default CLI HTTP client.

type HTTPFetcherConfig

type HTTPFetcherConfig struct {
	MaxBytes            int
	Timeout             time.Duration
	MaxRedirects        int
	AllowPrivateNetwork bool
}

HTTPFetcherConfig controls the CLI's default web_fetch backend.

Directories

Path Synopsis
Package ui defines terminal rendering contracts for memax-code.
Package ui defines terminal rendering contracts for memax-code.

Jump to

Keyboard shortcuts

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