cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBox

func BuildBox(opts *BoxOpts) (*starbox.Starbox, error)

BuildBox creates a new Starbox with the given options. By default every wired module is available (the open posture); a restrictive --caps tier / STAR_CAPS or an --allow-* flag installs a capability load gate so only the permitted modules may be loaded.

func Process

func Process(args *Args) int

Process routes the parsed arguments to the desired run mode and returns the process exit code.

func SetLog

func SetLog(l *zap.SugaredLogger)

SetLog sets the logger from outside the package.

Types

type Args

type Args struct {
	AllowRecursion      bool
	AllowGlobalReassign bool
	ModulesToLoad       []string
	IncludePath         string
	FileName            string
	CodeContent         string
	WebPort             uint16
	NumberOfArgs        int
	Arguments           []string
	LogLevel            string
	ShowVersion         bool
	InteractiveMode     bool
	OutputPrinter       string
	ConfigFile          string
	MaxSteps            uint64
	MaxOutput           uint
	Caps                string
	AllowNet            bool
	AllowFS             bool
	AllowCmd            bool
	Dangerous           bool
	Check               bool
	LogFile             string
	LogFormat           string
	Record              string
}

Args is the command line arguments for starcli.

func ParseArgs

func ParseArgs() *Args

ParseArgs parses command line arguments and returns the Args object.

func (*Args) BasicBoxOpts

func (a *Args) BasicBoxOpts() *BoxOpts

BasicBoxOpts returns the basic BoxOpts object based on the command line arguments.

type BoxOpts

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

BoxOpts defines the options for creating a new Starbox instance.

Jump to

Keyboard shortcuts

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