Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
Show 44 variants Doctor { offline: bool, quick: bool, fix: bool, json: bool, }, Commands { json: bool, }, Schema { cmd: String, }, Version, Goto { url: String, init_script: Option<String>, handle_before_unload: bool, navigation_timeout_ms: Option<u64>, }, View { verbose: bool, path: Option<PathBuf>, }, Press { target: String, dblclick: bool, include_snapshot: bool, }, ClickAt { x: f64, y: f64, dblclick: bool, include_snapshot: bool, }, Write { target: String, value: String, include_snapshot: bool, }, Keys { key: String, include_snapshot: bool, }, Type { text: String, target: Option<String>, clear: bool, submit: Option<String>, focus_only: bool, }, Wait { ms: u64, text: Vec<String>, selector: Option<String>, state: Option<String>, wait_timeout_ms: Option<u64>, include_snapshot: bool, }, Hover { target: String, include_snapshot: bool, }, Drag { from: String, to: String, include_snapshot: bool, }, FillForm { json: String, include_snapshot: bool, }, Upload { target: String, path: PathBuf, include_snapshot: bool, }, Back, Forward, Reload { ignore_cache: bool, init_script: Option<String>, handle_before_unload: bool, }, Eval { expression: String, args: Option<String>, dialog_action: Option<String>, file_path: Option<PathBuf>, }, Grab { path: Option<PathBuf>, format: GrabFormat, full_page: bool, quality: Option<i32>, element: Option<String>, }, Run { script: PathBuf, }, Exec { args: Vec<String>, }, Extract { target: String, attr: Option<String>, }, Text { target: String, }, Scroll { target: Option<String>, delta_x: f64, delta_y: f64, }, Cookie { action: CookieAction, }, Attr { target: String, name: String, }, Assert { kind: AssertKind, }, Console { action: ConsoleAction, }, Net { action: NetAction, }, Page { action: Option<PageAction>, }, Dialog { action: DialogAction, }, Scrape { url: String, }, Emulate { user_agent: Option<String>, locale: Option<String>, timezone: Option<String>, offline: bool, latitude: Option<f64>, longitude: Option<f64>, media: Option<String>, network_conditions: Option<String>, cpu_throttling_rate: Option<f64>, color_scheme: Option<String>, extra_headers: Option<String>, viewport: Option<String>, }, Resize { width: i32, height: i32, scale: f64, mobile: bool, }, Perf { action: PerfAction, }, Lighthouse { url: String, out_dir: Option<PathBuf>, device: String, mode: String, lighthouse_path: Option<PathBuf>, }, Screencast { action: ScreencastAction, }, Heap { action: HeapAction, }, Extension { action: ExtensionAction, }, Devtools3p { action: Devtools3pAction, }, Webmcp { action: WebmcpAction, }, Completions { shell: CompletionShell, },
}

Variants§

§

Doctor

Diagnose Chrome install and one-shot readiness

Fields

§offline: bool
§quick: bool
§fix: bool
§json: bool
§

Commands

List available commands

Fields

§json: bool
§

Schema

JSON Schema fragment for a command (agent discovery)

Fields

§

Version

Print CLI version

§

Goto

Navigate to a URL (one-shot)

Fields

§init_script: Option<String>

JS to evaluate before navigation (tool-ref initScript)

§handle_before_unload: bool

Accept beforeunload dialogs automatically

§navigation_timeout_ms: Option<u64>

Navigation timeout override in milliseconds

§

View

Accessibility snapshot with @eN refs

Fields

§verbose: bool
§

Press

Click an element (selector or @eN)

Fields

§target: String
§dblclick: bool
§include_snapshot: bool

Attach slim a11y snapshot in the same process after the action

§

ClickAt

Click at page CSS coordinates (requires –experimental-vision)

Fields

§dblclick: bool
§include_snapshot: bool

Attach slim a11y snapshot after the click

§

Write

Fill an input value (select/checkbox/radio/text smart fill)

Fields

§target: String
§value: String
§include_snapshot: bool

Attach slim a11y snapshot after fill

§

Keys

Press a keyboard key

Fields

§include_snapshot: bool

Attach slim a11y snapshot after the key press

§

Type

Type text (tool-ref type_text). Use –target or –focus-only.

Fields

§text: String

Text to type (required positional)

§target: Option<String>

CSS selector or @eN (optional; use –focus-only for focused element)

§clear: bool
§submit: Option<String>

Optional key to press after typing (e.g. Enter)

§focus_only: bool

Type into currently focused element without resolving a target

§

Wait

Wait for ms and/or text and/or selector and/or load state

Fields

§ms: u64
§text: Vec<String>

Text to wait for (repeatable; resolves when any value appears — tool-ref OR)

§selector: Option<String>
§state: Option<String>

Page lifecycle: load | domcontentloaded | networkidle | none

§wait_timeout_ms: Option<u64>

Max wait time in milliseconds for text/selector/state (0 = default)

§include_snapshot: bool

Attach slim a11y snapshot after the wait succeeds

§

Hover

Hover an element

Fields

§target: String
§include_snapshot: bool

Attach slim a11y snapshot after hover

§

Drag

Drag from one target to another

Fields

§from: String
§include_snapshot: bool

Attach slim a11y snapshot after drag

§

FillForm

Fill multiple form fields from JSON [{target|uid,value},...]

Fields

§json: String
§include_snapshot: bool

Attach slim a11y snapshot after fill-form

§

Upload

Upload a file to a file input

Fields

§target: String
§path: PathBuf
§include_snapshot: bool

Attach slim a11y snapshot after upload

§

Back

History back

§

Forward

History forward

§

Reload

Reload current page

Fields

§ignore_cache: bool
§init_script: Option<String>

JS to run before navigation/reload (tool-ref initScript)

§handle_before_unload: bool

Accept beforeunload dialogs automatically

§

Eval

Evaluate JavaScript (expression or function declaration)

Fields

§expression: String

JS expression or function declaration () => ...

§args: Option<String>

Snapshot uids (@eN) passed as function args (JSON array of strings)

§dialog_action: Option<String>

accept | dismiss | prompt response text (default accept)

§file_path: Option<PathBuf>

Write evaluate result JSON to this path

§

Grab

Capture a screenshot

Fields

§format: GrabFormat
§full_page: bool
§quality: Option<i32>
§element: Option<String>

CSS selector or @eN element to capture

§

Run

Run multi-step NDJSON script in one process

Fields

§script: PathBuf
§

Exec

Limited inline subcommand (goto)

Fields

§args: Vec<String>
§

Extract

Extract text or attribute from a target

Fields

§target: String
§

Text

Extract visible text from a target (PRD §7 text)

Fields

§target: String
§

Scroll

Scroll page or element by delta pixels (PRD §7 scroll)

Fields

§target: Option<String>

CSS selector or @eN (optional; omit for window scroll)

§delta_x: f64
§delta_y: f64
§

Cookie

Cookie jar helpers for the active page (Network domain)

Fields

§

Attr

Read one attribute from a target

Fields

§target: String
§name: String
§

Assert

Assertions (url / text / console)

Fields

§

Console

Captured console messages (–capture-console)

Fields

§

Net

Captured network requests (–capture-network)

Fields

§action: NetAction
§

Page

Page info or multi-tab management

Fields

§

Dialog

Accept or dismiss dialogs

Fields

§

Scrape

Navigate and return body text

Fields

§

Emulate

Emulate device / network / UA / geo / CPU

Fields

§user_agent: Option<String>
§locale: Option<String>
§timezone: Option<String>
§offline: bool
§latitude: Option<f64>
§longitude: Option<f64>
§network_conditions: Option<String>

Network preset: Offline, No throttling, Slow 3G, Fast 3G, Slow 4G, Fast 4G

§cpu_throttling_rate: Option<f64>

CPU slowdown factor 1..=20 (1 disables)

§color_scheme: Option<String>

prefers-color-scheme: dark | light | auto

§extra_headers: Option<String>

Extra HTTP headers as JSON object string

§viewport: Option<String>

Viewport WxHxDPR with optional ,mobile, ,touch, ,landscape flags

§

Resize

Resize page viewport

Fields

§width: i32
§height: i32
§scale: f64
§mobile: bool
§

Perf

Performance trace / metrics

Fields

§action: PerfAction
§

Lighthouse

Run Lighthouse audit (external binary)

Fields

§out_dir: Option<PathBuf>
§device: String
§mode: String

navigation (default) or snapshot (maps to navigation in one-shot CLI)

§lighthouse_path: Option<PathBuf>
§

Screencast

Screencast start/stop (experimental)

Fields

§

Heap

Heap snapshot tools (requires –category-memory for deep analysis)

Fields

§action: HeapAction
§

Extension

Chrome extension tools (requires –category-extensions)

Fields

§

Devtools3p

Third-party developer tools surface (requires –category-third-party)

Fields

§

Webmcp

Web surface tools (requires –category-webmcp)

Fields

§

Completions

Generate shell completions (path leve, no Chrome)

Fields

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> 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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