commands

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrewCmd added in v0.1.0

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

func NewBrewCmd added in v0.1.0

func NewBrewCmd(flags *core.Flags) *BrewCmd

func (*BrewCmd) Register added in v0.1.0

func (bc *BrewCmd) Register(app *cli.Command) *cli.Command

type EncryptCmd added in v0.3.0

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

func NewEncryptCmd added in v0.3.0

func NewEncryptCmd(coreFlags *core.Flags) *EncryptCmd

func (*EncryptCmd) Register added in v0.3.0

func (ec *EncryptCmd) Register(app *cli.Command) *cli.Command

type ExecuteArgs added in v0.3.0

type ExecuteArgs struct {
	Types         []RunnerType
	TerminalWidth int               // Width of the Terminal
	Expr          string            // Evaluation Expression
	Macros        map[string]string // Macro definitions for expression expansion
	List          bool              // List matching items without executing
	Program       *vm.Program       // Pre-compiled expression program (optional, compiled if nil)
}

type HookCmd added in v0.3.0

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

func NewHookCmd added in v0.3.0

func NewHookCmd(coreFlags *core.Flags) *HookCmd

func (*HookCmd) Register added in v0.3.0

func (hc *HookCmd) Register(app *cli.Command) *cli.Command

type ListItem added in v0.3.0

type ListItem struct {
	Name string
	Tags []string
}

ListItem represents an item to be displayed in a list

type RunCmd added in v0.1.0

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

func NewScriptsCmd added in v0.1.0

func NewScriptsCmd(coreFlags *core.Flags) *RunCmd

func (*RunCmd) Register added in v0.1.0

func (sc *RunCmd) Register(app *cli.Command) *cli.Command

type Runner added in v0.3.0

type Runner interface {
	// Form returns a group reference that is mounted to a huh.Form for users to select
	// what actions they want to perform. The [Action] implementer should store the
	// internal state of the selected values for execution later.
	Field(ctx context.Context) huh.Field

	// Execute the configured [Actions]
	Execute(ctx context.Context, args ExecuteArgs) error
}

type RunnerType added in v0.3.0

type RunnerType = string
const (
	RunnerTypeTemplate RunnerType = "template"
	RunnerTypeScript   RunnerType = "script"
)

func RunnerTypeFromStrings added in v0.3.0

func RunnerTypeFromStrings(strs []string) ([]RunnerType, error)

RunnerTypeFromStrings converts a slice of strings to a slice of RunnerType values. Returns an error if any string is not a valid RunnerType.

type ScriptRunner added in v0.3.0

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

func NewScriptRunner added in v0.3.0

func NewScriptRunner(cfg *core.ConfigFile) *ScriptRunner

func (*ScriptRunner) Execute added in v0.3.0

func (sr *ScriptRunner) Execute(ctx context.Context, args ExecuteArgs) error

Execute implements Runner.

func (*ScriptRunner) Field added in v0.3.0

func (sr *ScriptRunner) Field(ctx context.Context) huh.Field

Form implements Runner.

type TemplateRunner added in v0.3.0

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

func NewTemplateRunner added in v0.3.0

func NewTemplateRunner(cfg *core.ConfigFile) *TemplateRunner

func (*TemplateRunner) Execute added in v0.3.0

func (tr *TemplateRunner) Execute(ctx context.Context, args ExecuteArgs) error

Execute implements Runner.

func (*TemplateRunner) Field added in v0.3.0

func (tr *TemplateRunner) Field(ctx context.Context) huh.Field

Form implements Runner.

Jump to

Keyboard shortcuts

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