Command Surface
Most people should start with the Prompt Cookbook and let an agent operate Webcmd. This page documents the public browser command surface for debugging and advanced manual use.Sessions
Create a named Session before browser work. Its readable ID is immutable and Profile-scoped, so keep using the same Profile and ID for the Session’s lifetime.--session when
needed. session close is blocked while the Session has a live handoff.
session create, session list, and session close accept the universal
output formats. An explicit -f table remains a table when redirected, while
an empty structured Session list remains machine-readable, such as [] with
-f json.
Browser Inspection
Usetabs to inspect the Session and snapshot to read page state.
act is the action-first snapshot mode, tree preserves fuller page structure,
and read extracts readable article or content text.
Browser Programs
Usebrowser run for a small Playwright-style program inside the selected
Session. Exactly one of --file <path> or --stdin is required.
--timeout is measured in seconds and --max-output bounds returned
results and logs. Successful runs include a snapshotDiff by default. Use
--no-snapshot-diff only when a read-only program already returns all required
state.
Programs run in a fresh QuickJS sandbox with page, context, browser, and
console globals. They can use supported Page, Frame, and Locator methods and
passively inspect request and response events. They cannot access Node.js, the
filesystem, environment variables, raw CDP endpoints, browser launch APIs,
browser-context ownership, or context.newPage().
On some local Cloak builds, page.setContent() can apply the markup without
resolving because Playwright waits for a console event that build does not emit.
If the call times out, inspect the page before retrying. For this Cloak case,
write the markup directly to keep the page on its current origin:
tabs, bind, run, and snapshot.
Direct URL Fetch
For a public URL that does not require browser rendering, an agent can try a local fetch first:FETCH_REQUIRES_BROWSER or FETCH_BLOCKED, continue in an
explicit browser Session. web fetch remains local and never opens a browser.
Browser Selection
Configure local browser mode withwebcmd setup. Cloak is bundled and selected
by default. Chrome uses an installed Google Chrome with Webcmd-managed Profiles,
SLAB is a macOS alpha option, and an absolute path selects a compatible local
browser executable.
webcmd doctor.
The Chrome transport uses a normal headed launch over a nonzero loopback CDP
port; this is not a claim that Chrome is generally undetectable.
Profiles
Profiles keep browser identity and sign-in state separate.--profile <name> values lazily create separate local
state. In hosted mode, --profile <name> selects an identity within the active
workspace. An omitted selector uses that workspace’s default Profile.
Prompt example:
Hosted Workspaces
Resolution order is the flag, then the environment variable, then the implicit
default workspace. Local mode has no workspace concept.
Hosted Artifacts
Hosted browser receipts retain theircloud-artifact:// locator and include an
authenticated download URL. Download an artifact with:
--output is required. Webcmd authenticates the request using the configured
Cloud credentials.
Top-Level Commands
Output Formats
Commands that return data supporttable, plain, json, yaml, md, and
csv through -f/--format. Agents should normally request JSON; table and
plain formats are easier to read manually.
yml and markdown are aliases for yaml and md.
Skills
The package ships one agent skill,webcmd-browser:
skills add prompts for any missing scope and agent harness. Use
--scope <user|project> and --provider <agents|codex|claude> to skip those
prompts, or --path <skills-dir> for a custom location.