Skip to main content

Command

Enum Command 

Source
pub enum Command {
Show 28 variants SessionOpen { policy: Option<String>, }, SessionClose, Open { url: String, }, Close { page: String, }, View { page: String, full: bool, }, Read { page: String, r: u32, }, Act { page: String, r: u32, op: String, value: Option<String>, token: String, group: Option<String>, }, Find { query: String, }, Wait { page: String, cond: String, value: Option<String>, timeout: u64, }, Status, Extract { page: String, schema: String, token: String, }, Mark { page: String, r: u32, name: String, token: String, }, Annotate { target: String, key: String, value: Option<String>, }, Log { page: Option<String>, group: Option<String>, since: Option<i64>, limit: Option<i64>, }, Skill { sub: Option<String>, name: Option<String>, }, Capture { page: String, r: Option<u32>, full_page: bool, }, Viewport { page: String, spec: String, dpr: u32, }, Layout { page: String, refs: Vec<u32>, }, Auth { sub: String, rest: Vec<String>, }, Inspect { page: String, kind: String, rest: Vec<String>, since: Option<String>, level: Option<String>, status: Option<String>, max: Option<String>, full: bool, unsafe_log: bool, }, MoveTo { page: String, x: f64, y: f64, mode: String, }, ClickAt { page: String, x: f64, y: f64, token: String, mode: String, }, HoverAt { page: String, x: f64, y: f64, mode: String, }, Drag { page: String, x1: f64, y1: f64, x2: f64, y2: f64, token: String, mode: String, }, PromptInput { page: String, r: u32, message: String, secret: bool, token: String, group: Option<String>, }, PromptConfirm { page: String, message: String, }, Serve { stop: bool, }, Mcp,
}
Expand description

The subcommand vocabulary. One variant per primitive.

Each variant has a visible_alias short form for token economy in agent contexts (mirrors agented’s s / i / d / w / br pattern). Long forms remain for human readers.

Variants§

§

SessionOpen

  1. Open a new session.

Fields

§policy: Option<String>
§

SessionClose

  1. Close the active session.
§

Open

  1. Open a page navigated to URL.

Fields

§

Close

  1. Close a page.

Fields

§page: String
§

View

  1. View a page (delta by default; --full re-baselines).

Fields

§page: String
§full: bool
§

Read

  1. Read the full text of a ref.

Fields

§page: String
§

Act

  1. Perform an action on a ref.

Fields

§page: String
§token: String
§

Find

  1. Search across pages in the session.

Fields

§query: String
§

Wait

  1. Wait for a condition on a page.

Fields

§page: String
§cond: String
§timeout: u64
§

Status

  1. Status summary for the active session (or all sessions).
§

Extract

  1. Extract structured data using a known schema.

Fields

§page: String
§schema: String
§token: String
§

Mark

  1. Persist a ref as a named anchor.

Fields

§page: String
§name: String
§token: String
§

Annotate

  1. Attach a (key, value) annotation to a target (one of ref:N, mark:NAME, or page).

Fields

§target: String
§

Log

  1. Slice the audit log.

Fields

§since: Option<i64>
§limit: Option<i64>
§

Skill

  1. Skill management. Subcommand: list or show <name>. (M6 adds <name> [args] execution.)

Fields

§

Capture

  1. Capture a screenshot. Defaults to viewport scope; pass a ref to capture an element, or --full-page.

Fields

§page: String
§full_page: bool
§

Viewport

  1. Set the viewport. spec is a preset (e.g. mobile, desktop) or WxH (e.g. 1280x720).

Fields

§page: String
§spec: String
§dpr: u32
§

Layout

  1. Compute layout boxes for one or more refs.

Fields

§page: String
§refs: Vec<u32>
§

Auth

  1. Auth blob management. Subcommand: save <page> <name>, load <page> <name>, list, or clear <name>.

Fields

§rest: Vec<String>
§

Inspect

  1. Inspect engine state — console, network, request detail, storage, scripts, dom, performance. The first positional is the page id; the second is the kind. Trailing positionals are kind-specific (e.g. request <seq>, eval <expr>, storage <scope>, script <seq>).

Fields

§page: String
§kind: String
§rest: Vec<String>
§status: Option<String>
§full: bool
§unsafe_log: bool
§

MoveTo

Move the cursor to (x, y) along a humanized Bezier path. Native trusted-event dispatch on macOS; ENGINE_UNSUPPORTED elsewhere until M7 wires GDK / CDP input.

Fields

§page: String
§mode: String
§

ClickAt

Click at (x, y). Trusted on macOS (isTrusted = true).

Fields

§page: String
§token: String
§mode: String
§

HoverAt

Hover at (x, y).

Fields

§page: String
§mode: String
§

Drag

Drag from (x1, y1) to (x2, y2).

Fields

§page: String
§x1: f64
§y1: f64
§x2: f64
§y2: f64
§token: String
§mode: String
§

PromptInput

Prompt the user (in the terminal that ran vs) for a value, then fill it into a ref. The value is read from tty by the CLI and shipped to the daemon over the local socket; the agent that invoked vs prompt-input never sees the bytes. Use --secret for passwords, TANs, and other credentials (terminal echo off).

Fields

§page: String
§message: String
§secret: bool
§token: String
§

PromptConfirm

Block until the user presses Enter in the terminal. Returns ok on confirm or ! ABORTED if the user sends EOF / Ctrl-C. Use as a human-in-loop gate before a sensitive vs act click.

Fields

§page: String
§message: String
§

Serve

Run the daemon in this process. The vs binary doubles as the daemon — vs serve is what auto-spawn re-execs when the socket is missing. SIGINT shuts down cleanly.

Fields

§stop: bool

Send SIGTERM to the running daemon (PID file at ~/.vibesurfer/daemon.pid) and wait for the socket to disappear. Returns immediately if no daemon is running.

§

Mcp

Run the MCP (Model Context Protocol) server over stdio. Speaks JSON-RPC 2.0; each of the 19 vibesurfer primitives is exposed as one MCP tool. Wire to Claude Desktop / Claude Code by configuring vs mcp as the server command.

Implementations§

Source§

impl Command

Source

pub fn to_request(&self, session_id: Option<&str>) -> Result<Request>

Build the wire Request for this subcommand. Returns None for commands that the CLI handles locally (none yet).

Source

pub fn needs_session(&self) -> bool

True if this subcommand requires an active session.

Trait Implementations§

Source§

impl Debug for Command

Source§

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

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

impl FromArgMatches for Command

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 Command

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, 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