Command Reference

se-cli ships with commands grouped into nine categories. Session-level commands run in the CLI process; the rest are forwarded to the daemon. Pick a tab to browse each group.

CommandDescription
open [url]Start daemon + browser, optionally navigate to URL
closeClose browser and daemon
listList all sessions
close-allClose all sessions gracefully
kill-allForce-kill all sessions
CommandDescription
goto <url>Navigate to URL
go-backBrowser back
go-forwardBrowser forward
reloadReload page
CommandDescription
click <ref|selector>Click element
fill <ref|selector> <text>Clear and fill input
type <text>Type into focused element
press <key>Press keyboard key (Enter, Tab, Escape, …)
select <ref> <value>Select dropdown option
check <ref>Check checkbox
uncheck <ref>Uncheck checkbox
hover <ref>Mouse hover over element v0.5
dblclick <ref>Double-click element v0.5
drag <start> <end>Drag and drop element v0.5
dialog-accept [text]Accept alert/confirm/prompt dialog v0.5
dialog-dismissDismiss dialog v0.5
upload <ref> <file>Upload file to input element v0.5
resize <w> <h>Set viewport size v0.5
keydown <key>Press and hold key v0.5
keyup <key>Release held key v0.5
mousemove <x> <y>Move mouse to coordinates v0.5
mousedown [button]Press mouse button (left/right/middle) v0.5
mouseup [button]Release mouse button v0.5
mousewheel <dx> <dy>Scroll wheel by offsets v0.5
actions-chain <json>Chain multiple actions in one perform() v0.5
i
v0.5 shipped. All interaction commands consume the v0.4 wait/retry configuration. Use actions-chain to batch multiple steps into a single round-trip.
CommandDescription
snapshot [ref]Aria snapshot of page or element subtree
snapshot --depth=NLimit snapshot depth
snapshot --filename=f.ymlSave snapshot to file
find <text>Search snapshot for text
find --regex <pattern>Search snapshot with regex
CommandDescription
screenshot [ref]Take screenshot (full page or element)
screenshot --filename=f.pngSave screenshot to file
eval "<js>"Execute JavaScript, return result
eval "<js>" <ref>Execute JavaScript on element
titleGet page title
urlGet current URL
CommandDescription
cookie-listList all cookies for the current page
cookie-get <name>Get a single cookie by name
cookie-set <json>Add or overwrite a cookie
cookie-delete <name>Delete a cookie by name
localstorage-get <key>Read a localStorage value
localstorage-set <key> <val>Write a localStorage value
localstorage-delete <key>Delete a localStorage value
localstorage-clearClear all localStorage
sessionstorage-*Same family for sessionStorage
state-save <file>Export cookies + storage to JSON
state-load <file>Restore cookies + storage from JSON
CommandDescription
tab-listList all open tabs/windows in the session
tab-new <url>Open a new tab and navigate to URL
tab-closeClose the current tab
tab-select <handle>Switch to a tab by window handle
CommandDescription
config get <key>Show a config value and its source
config set <key> <value>Write a value to the config file
config listList all settings with source (flag/env/file/default)
config initGenerate a template config file
i
v0.4. See the Configuration page for the 4-tier priority system and wait/retry flags.
CommandDescription
expect <ref> visibleAssert element is visible (exit 0/1)
expect <ref> hiddenAssert element is hidden
expect <ref> enabledAssert element is enabled
expect <ref> disabledAssert element is disabled
expect <ref> checkedAssert checkbox is checked
expect <ref> uncheckedAssert checkbox is unchecked
expect <ref> text "..."Assert element text (substring match)
expect <ref> value "..."Assert input value
expect <ref> count NAssert matching element count
expect <ref> attribute <name> <value>Assert attribute value
expect title "..."Assert page title
expect url "..."Assert page URL
--notInvert assertion (e.g. expect NOT visible)
--exactStrict match instead of substring
--timeout=<ms>Polling timeout (default 5000ms)
CommandDescription
highlight <ref>Outline element with persistent CSS overlay (default: 3px solid red) v0.7
highlight <ref> --style="2px solid blue"Custom CSS outline style v0.7
highlight <ref> --hideRemove highlight from a specific element v0.7
highlight --hide --allRemove all highlights v0.7
highlightList all active highlights (no args) v0.7
consoleAll buffered console messages since session start v0.7
console errorFilter by level: error, warning, info, verbose v0.7
console js-errorShow only JavaScript exceptions v0.7
console --since=5mMessages from the last 5 minutes (30s, 1h, ...) v0.7
console --clearClear the console buffer after output v0.7
requestsList all buffered network requests v0.7
requests --filter="api"Filter requests by URL substring v0.7
requests --status=500Filter by HTTP status code v0.7
requests --method=POSTFilter by HTTP method v0.7
requests --clearClear the network request buffer v0.7
request <index>Show full request details (headers, body, response) v0.7
route <pattern> --status=401Register a mock response for matching URLs via BiDi v0.7
route <pattern> --body='{"error":"..."}'Mock with custom response body v0.7
route <pattern> --headers='{"X-Custom":"val"}'Mock with custom response headers v0.7
route-listList all active route intercepts v0.7
unroute <index>Remove a specific route intercept v0.7
unroute --allRemove all route intercepts v0.7
i
v0.7 shipped. Network interception and console capture use the Selenium BiDi protocol (log.entryAdded, Network.addIntercept). The highlight command is pure JS injection and works on all browsers — no BiDi required. BiDi listeners initialize lazily on first use of any network/debug command.
FlagDescription
--rawOutput only the result value (for scripting)
--jsonStructured JSON output
-s=<name>Use named session
--browser=chrome|edge|firefoxBrowser selection (default: chrome)
--headedShow browser window (default: headless)
--cdp=<url>Attach to running Chrome via CDP
--profile=<path>Persistent user data directory (v0.2)
--persistentAuto-assign a persistent userDataDir (v0.2)
--depth=<N>Limit aria snapshot recursion (default: 50)
--filename=<f>Save snapshot/screenshot to file
--regex=<pattern>Search snapshot with regex (find)
--submitSubmit form after fill (Enter key)
--timeout=<ms>Per-command explicit-wait timeout (v0.4, default 5000)
--wait=<state>Wait condition: visible|hidden|enabled|disabled|stable|attached|none|auto (v0.4)
--retry=<n>Failure retry count, -1 = until timeout (v0.4)
--retry-interval=<ms>Polling interval for retries (v0.4, default 100)
--implicit-wait=<ms>Driver implicit wait (v0.4)
--page-load-timeout=<ms>driver.manage().timeouts().pageLoadTimeout() (v0.4)
--script-timeout=<ms>setScriptTimeout for async eval (v0.4)
--no-waitShorthand for --wait=none --timeout=0 (v0.4)
--notInvert assertion (v0.6)
--exactStrict match for assertions (v0.6)
--style="..."Custom CSS outline for highlight (v0.7)
--hideRemove highlight from element(s) (v0.7)
--allApply to all highlights or routes (v0.7)
--since=<duration>Time filter for console (e.g. 5m, 30s, 1h) (v0.7)
--clearClear buffer after output (console/requests) (v0.7)
--filter="..."Filter requests by URL substring (v0.7)
--status=<code>Filter/mock HTTP status code (v0.7)
--method=<VERB>Filter requests by HTTP method (v0.7)
--body='...'Mock response body for route (v0.7)
--headers='{"k":"v"}'Mock response headers for route (v0.7)

Output formats

Every command returns a response with up to four sections: Page, Snapshot, Ran Selenium code, and Result. --raw returns only the result value; --json returns a structured {page, snapshot, code, result} object for pipelines.

response
### Page
- Page URL: https://example.com/
- Page Title: Example Domain

### Snapshot
- e1 [heading "Welcome"]
- e2 [link "Learn more"]

### Ran Selenium code
await driver.findElement(By.css('[data-se-ref="e2"]')).click();

### Result
clicked

See the Snapshots & Refs guide for the algorithm behind snapshot, or the Configuration page for the v0.4 wait/retry flags.