cmd

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

func SetVersion

func SetVersion(v string)

Types

type BatchResult added in v0.2.0

type BatchResult struct {
	Steps   []BatchStep  `json:"steps"`
	Final   any          `json:"final,omitempty"`
	FinalOp string       `json:"final_op,omitempty"`
	Summary BatchSummary `json:"summary"`
}

BatchResult is the final JSON returned by `ghostchrome batch`.

type BatchStep added in v0.2.0

type BatchStep struct {
	Index  int    `json:"step"`
	Cmd    string `json:"cmd"`
	Args   string `json:"args,omitempty"`
	OK     bool   `json:"ok"`
	TimeMs int64  `json:"ms"`
	Error  string `json:"error,omitempty"`
}

BatchStep captures one line of execution in the script.

type BatchSummary added in v0.2.0

type BatchSummary struct {
	Total  int   `json:"total"`
	Ok     int   `json:"ok"`
	Failed int   `json:"failed"`
	TimeMs int64 `json:"total_ms"`
}

BatchSummary gives the agent a glanceable overview.

type LocatorFlags added in v0.6.0

type LocatorFlags struct {
	Role  string
	Name  string
	Label string
	Text  string
}

LocatorFlags are the shared --by-role / --by-name / --by-label / --by-text flags wired onto click / type / hover. They're mutually compatible with the positional @ref argument: if a --by-* flag is set, it wins; otherwise the ref is used.

func (LocatorFlags) Any added in v0.6.0

func (f LocatorFlags) Any() bool

Any reports whether at least one locator flag was set.

func (LocatorFlags) Describe added in v0.6.0

func (f LocatorFlags) Describe() string

Describe renders a short label used by output helpers.

func (*LocatorFlags) RegisterOn added in v0.6.0

func (f *LocatorFlags) RegisterOn(cmd *cobra.Command)

RegisterOn installs the standard --by-* flags on cmd, writing to the fields of f. Call this from the init() of each command that supports locators.

func (LocatorFlags) ToLocator added in v0.6.0

func (f LocatorFlags) ToLocator() engine.Locator

ToLocator converts flags into an engine.Locator.

Jump to

Keyboard shortcuts

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