doppel

v0.7.2
io.github.Samrj12/doppel Checked 4 days ago Published 3 months ago

Drive your real, logged-in Chrome/Edge from AI agents over CDP.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

doppel_status

Check whether the Doppel browser extension is connected. Call this first if other tools error out.

doppel_navigate

Navigate the active tab: go to a URL, or go back/forward/reload. Waits for load. Returns the final URL plus a fresh page snapshot (by default).

ParameterTypeDescription
includeSnapshotbooleanReturn a fresh snapshot after navigating. Default true.
typestringNavigation type. Default 'url'.
urlstringAbsolute URL (required when type is 'url').

doppel_snapshot

Capture a structured accessibility snapshot of the current page. Elements are tagged with a [ref] for doppel_click/doppel_type; refs stay stable across grep/offset within a snapshot. Fast: no screenshot. On dense pages (search results, shopping) use interactive:true and/or grep to cut noise, and offset to page through results.

ParameterTypeDescription
grepstringKeep only elements whose printed line matches this text or regex (case-insensitive), e.g. 'Dell', 'button', or 'button "S"'.
interactivebooleanOnly actionable elements (links/buttons/inputs); skips headings/static text/lists. Best for dense pages.
limitintegerMax elements to return. Default 500; 300-1000 is a good range. Prefer interactive/grep over a huge limit.
offsetintegerSkip the first N matching elements (paginate a long page).
withinSerialize only part of the page: a [ref] to scope to that element's subtree, or a container role like "dialog", "form", or "navigation" to scope to that region. Ignores the rest.

doppel_scroll

Scroll an element into view by its [ref] - e.g. to scroll to the last item of a list to trigger lazy-loading / infinite scroll, then re-snapshot. The snapshot already captures the whole page (all elements, on- or off-screen) and clicks auto-scroll into view, so use this only to trigger scroll-driven loading, not to 'see more'.

ParameterTypeDescription
ref *integerThe [ref] of the element to scroll into view.
includeSnapshotbooleanReturn a fresh snapshot after scrolling. Default true.

doppel_click

Click an element by its [ref] from the latest snapshot. Waits until it's actionable, then uses trusted native input. If you already know several actions from this snapshot, prefer doppel_batch to run them in one call.

ParameterTypeDescription
ref *integerThe [ref] number from a snapshot
includeSnapshotbooleanReturn a fresh snapshot after clicking. Default true.

doppel_type

Type text into an element by its [ref]. Waits until actionable, focuses it, and inserts trusted text (works with React/controlled inputs).

ParameterTypeDescription
ref *integerThe [ref] of the input/textarea from a snapshot
text *stringThe text to type
includeSnapshotbooleanReturn a fresh snapshot after typing. Default true.

doppel_upload

Upload local file(s) to a file input WITHOUT opening the native OS file dialog. Point `ref` at the upload control from a snapshot - the file input itself, or the button/label that opens it (Doppel finds the underlying <input type=file>). `path` is an absolute path on this machine; pass an array for a multi-file input. Fires the real change event, so the page reacts exactly as if a human picked the file.

ParameterTypeDescription
path *Absolute path to a local file (must be under Downloads/Documents/Desktop/Pictures/temp or $DOPPEL_UPLOAD_DIRS), or an array for a multi-file input.
ref *integerThe [ref] of the upload control (the file input, or the button/label that opens it).
includeSnapshotbooleanReturn a fresh snapshot after uploading. Default true.

doppel_press_key

Press a special key (Enter, Tab, Backspace, Delete, Escape, Arrow keys) via trusted native input.

ParameterTypeDescription
key *stringKey name, e.g. Enter, Tab, ArrowDown
includeSnapshotbooleanReturn a fresh snapshot after the keypress. Default true.

doppel_list_tabs

List the tabs Doppel controls (its tab group), with URLs and which is active.

doppel_new_tab

Open a new tab (background, no focus stealing) and make it active. Optionally load a URL. Pass `group` to name the tab group by the task's purpose (e.g. '27in Monitor'); tabs sharing a group cluster together.

ParameterTypeDescription
groupstringShort purpose label for the tab group, e.g. '27in Monitor', 'Job Apply'. Defaults to 'Doppel'.
includeSnapshotbooleanReturn a snapshot after opening. Default true.
urlstringURL to load. Default about:blank.

doppel_set_group

Name the current tab's group by the task's PURPOSE (e.g. '27in Monitor', 'Job Apply'), not the site. Call this at the start of a task so the group chip reads as what you're doing instead of 'Doppel'.

ParameterTypeDescription
name *stringShort purpose label, e.g. '27in Monitor'.

doppel_select_tab

Switch the active tab to another tab Doppel controls (tabId from doppel_list_tabs).

ParameterTypeDescription
tabId *integerThe tab id from doppel_list_tabs
includeSnapshotbooleanReturn a snapshot of the newly active tab. Default true.

doppel_close_tab

Close a tab Doppel controls and drop its session.

ParameterTypeDescription
tabId *integerThe tab id from doppel_list_tabs

doppel_cleanup_tabs

Close leftover Doppel automation tabs. By default only the generic 'Doppel' / 'Doppel Test' groups (debris from past sessions), leaving purpose-named task groups alone. Pass all:true to also close every purpose-named Doppel task group. Non-Doppel tabs and groups are never touched.

ParameterTypeDescription
allbooleanAlso close purpose-named Doppel task groups, not just the generic ones.

doppel_hover

Hover the mouse over an element by its [ref] (reveals menus/tooltips). Waits until it's actionable.

ParameterTypeDescription
ref *integerThe [ref] from a snapshot
includeSnapshotbooleanReturn a fresh snapshot after hovering. Default true.

doppel_wait_for

Wait until specific text appears on the page, or for a fixed time. Use after an action that loads content.

ParameterTypeDescription
includeSnapshotbooleanReturn a snapshot after waiting. Default true.
textstringText to wait for (case-insensitive substring).
timeMsintegerOr wait a fixed number of milliseconds (max 60000).
timeoutMsintegerMax wait when using 'text' (default 10000).

doppel_screenshot

Screenshot the current page (PNG by default). Returns the image. Prefer doppel_snapshot (text) when possible; use this only when you need to SEE pixels.

ParameterTypeDescription
formatstringImage format. Default png.
fullPagebooleanCapture the full scrollable page, not just the viewport.
qualityintegerQuality 0-100 (jpeg/webp only).

doppel_batch

Apply a SEQUENCE of actions (click/type/press_key/hover) in ONE call, in order. PREFER THIS over separate click/type calls whenever you can already see the targets in the current snapshot - e.g. filling a form, ticking several checkboxes, or 'pick an option then click Continue'. Each separate tool call costs a full model round-trip; a batch is one. Refs come from the latest snapshot, so all targets must exist on the SAME page (a batch can't span a navigation). Stops at the first failed op and reports which one. Returns one snapshot at the end.

ParameterTypeDescription
ops *arrayOrdered list of actions.
includeSnapshotbooleanReturn a snapshot after the batch. Default true.

doppel_network

See the page's network activity, captured read-only from the moment the tab attaches. Without `reqid`, returns a compact one-line-per-request list; pass `reqid` for full detail plus the response body. Successful static assets (images/fonts/scripts/css) are hidden unless `includeStatic`. Filter with `grep` (URL), `status`, `method`, `resourceType`, `failedOnly`, `xhrOnly` (just API calls), or `sinceLastAction` (only what the last click/type/navigate triggered).

ParameterTypeDescription
bodystringWith reqid: which body to include. Default 'response'.
failedOnlybooleanOnly failed requests (transport error or status >= 400).
grepstringKeep requests whose URL matches this substring or regex (case-insensitive).
includeStaticbooleanInclude successful images/fonts/scripts/css (hidden by default).
limitintegerMax requests in the list. Default 50.
maxBytesintegerWith reqid: truncate inlined bodies to N bytes (default 10000).
methodstringHTTP method, e.g. GET, POST.
offsetintegerSkip the first N matching requests (paginate).
reqidintegerDrill into one request by its [id] from the list (full detail + body).
resourceTypestringdoc | css | img | script | font | xhr | fetch | ws | media | other.
saveToFilestringWith reqid: write the FULL response body to a file (filename only) in the Doppel captures dir (~/.doppel/captures or $DOPPEL_CAPTURE_DIR), instead of inlining it.
sinceLastActionbooleanOnly requests triggered since the last click/type/navigate.
statusstringStatus filter: "404", "5xx", ">=400".
xhrOnlybooleanOnly XHR/fetch requests (the API-call case).

doppel_console

See the page's console output + JS errors, captured read-only. By default shows browser-level problems (errors, warnings, failed network/CSP/deprecation), which is fully stealthy. Page console.log/info is NOT captured unless you set `pageConsole:true`, which enables the CDP Runtime domain (detectable by a hostile page while on, so off by default; captures from that point forward). Uncaught JS exceptions are merged in as errors; consecutive duplicates collapse with [xN].

ParameterTypeDescription
grepstringKeep messages whose text matches this substring or regex.
includeStackbooleanInclude stack traces (capped ~50 frames).
levelstringMinimum severity to show. Default 'warn' (warnings + errors + failures).
limitintegerMax messages. Default 50.
offsetintegerSkip the first N matching messages (paginate).
pageConsolebooleanCapture page console.log/info too (enables Runtime; detectable while on). Set false to turn it back off.