Commands

Enum Commands 

Source
pub enum Commands {
Show 34 variants Run { command: String, args: Vec<String>, cwd: Option<String>, cols: u16, rows: u16, }, Snap { elements: bool, accessibility: bool, interactive_only: bool, region: Option<String>, strip_ansi: bool, include_cursor: bool, }, Click { element_ref: String, double: bool, }, Fill { element_ref: String, value: String, }, Key { key: Option<String>, text: Option<String>, hold: bool, release: bool, }, Wait { params: WaitParams, }, Kill, Restart, Ls, Status { verbose: bool, }, Select { element_ref: String, option: String, }, MultiSelect { element_ref: String, options: Vec<String>, }, Scroll { direction: Option<ScrollDirection>, amount: u16, element: Option<String>, to_ref: Option<String>, }, Focus { element_ref: String, }, Clear { element_ref: String, }, SelectAll { element_ref: String, }, Count { role: Option<String>, name: Option<String>, text: Option<String>, }, Toggle { element_ref: String, on: bool, off: bool, }, Debug(DebugCommand), RecordStart, RecordStop { output: Option<String>, record_format: RecordFormat, }, RecordStatus, Trace { count: usize, start: bool, stop: bool, }, Console { lines: usize, clear: bool, }, Errors { count: usize, clear: bool, }, Resize { cols: u16, rows: u16, }, Attach { session_id: String, interactive: bool, }, Daemon(DaemonCommand), Version, Env, Assert { condition: String, }, Cleanup { all: bool, }, Find { params: FindParams, }, Completions { shell: Shell, },
}

Variants§

§

Run

Run a new TUI application in a virtual terminal

Fields

§command: String

Command to execute (e.g., bash, htop, vim)

§args: Vec<String>

Additional arguments for the command

§cwd: Option<String>

Working directory for the spawned process

§cols: u16

Terminal width in columns

§rows: u16

Terminal height in rows

§

Snap

Take a snapshot of the current screen state

Fields

§elements: bool

Include detected UI elements in output

§accessibility: bool

Output accessibility tree format (agent-browser style)

§interactive_only: bool

Filter to interactive elements only (used with -a)

§region: Option<String>

Limit snapshot to a named region

§strip_ansi: bool

Strip ANSI escape codes from output

§include_cursor: bool

Include cursor position in output

§

Click

Click an element by reference

Fields

§element_ref: String

Element reference (e.g., @btn1, @e3)

§double: bool

Double-click instead of single click

§

Fill

Set the value of an input element

Fields

§element_ref: String

Element reference (e.g., @inp1)

§value: String

Value to set in the input

§

Key

Send keystrokes or type text

Fields

§key: Option<String>

Key name or combination (e.g., Enter, Ctrl+C) - not required if –type is used

§text: Option<String>

Type text character by character

§hold: bool

Hold key down for modifier sequences

§release: bool

Release a held key

§

Wait

Wait for a condition to be met

Fields

§params: WaitParams
§

Kill

Terminate the current session

§

Restart

Restart the TUI application

§

Ls

List all active sessions

§

Status

Check daemon status

Fields

§verbose: bool

Show connection details

§

Select

Select an option from a dropdown or list

Fields

§element_ref: String

Element reference (e.g., @sel1)

§option: String

Option to select

§

MultiSelect

Select multiple options in a multi-select list

Fields

§element_ref: String

Element reference (e.g., @list1)

§options: Vec<String>

Options to select

§

Scroll

Scroll the terminal viewport

Fields

§direction: Option<ScrollDirection>

Scroll direction (up, down, left, right) - not required if –to is used

§amount: u16

Number of lines/columns to scroll

§element: Option<String>

Target element for scoped scrolling (not yet implemented)

§to_ref: Option<String>

Scroll until this element is visible

§

Focus

Set focus to an element

Fields

§element_ref: String

Element reference (e.g., @inp1)

§

Clear

Clear an input element’s value

Fields

§element_ref: String

Element reference (e.g., @inp1)

§

SelectAll

Select all text in an input element

Fields

§element_ref: String

Element reference (e.g., @inp1)

§

Count

Count elements matching criteria

Fields

§role: Option<String>

Element role to match (button, input, etc.)

§name: Option<String>

Element name/label to match

§text: Option<String>

Text content to match

§

Toggle

Toggle a checkbox or radio button

Fields

§element_ref: String

Element reference (e.g., @cb1)

§on: bool

Force checked state (idempotent)

§off: bool

Force unchecked state (idempotent)

§

Debug(DebugCommand)

Debugging subcommands for development and troubleshooting

§

RecordStart

Start recording screen activity

§

RecordStop

Stop recording and save output

Fields

§output: Option<String>

Output file path

§record_format: RecordFormat

Recording format

§

RecordStatus

Check recording status

§

Trace

View performance trace data

Fields

§count: usize

Number of trace entries to show

§start: bool

Start performance tracing

§stop: bool

Stop performance tracing

§

Console

View console output

Fields

§lines: usize

Number of lines to show

§clear: bool

Clear the console buffer

§

Errors

View captured errors

Fields

§count: usize

Number of errors to show

§clear: bool

Clear the error buffer

§

Resize

Resize the terminal window

Fields

§cols: u16

Number of columns

§rows: u16

Number of rows

§

Attach

Attach to an existing session

Fields

§session_id: String

Session ID to attach to

§interactive: bool

Interactive mode: attach terminal directly to the session

§

Daemon(DaemonCommand)

Daemon lifecycle management

§

Version

Show version information for CLI and daemon

§

Env

Show environment diagnostics

§

Assert

Assert a condition for testing/scripting

Fields

§condition: String

Condition to assert (text:pattern, element:ref, session:id)

§

Cleanup

Clean up stale sessions

Fields

§all: bool

Remove all sessions (not just dead ones)

§

Find

Find elements by semantic properties (role, name, text)

Fields

§params: FindParams
§

Completions

Generate shell completion scripts

Fields

§shell: Shell

Shell to generate completions for

Trait Implementations§

Source§

impl Debug for Commands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more