Command Surface
Most people should start with the Prompt Cookbook and let an agent use these commands. This page is the detailed surface for debugging, authoring, and advanced manual use.Discovery
webcmd list -f json is the source of truth for agents. It includes the site, command name, args, output columns, strategy, browser requirement, tags, and keywords.
Use webcmd list --tag <tag> -f json to filter commands by an exact, case-insensitive tag before rendering. For search-capable commands, use --tag search.
Adapter Execution
smart-search skill: it tries fetch-based search first, explicit browser Sessions after eligible fetch failures, and search adapters last.
Search and Fetch
Usewebcmd web fetch for direct URL fetches and fetch-first web search. It is built into the CLI, so it works on a fresh install with no plugins.
web fetch tries plain HTTP first, then browser-impersonating TLS clients. It remains local in both modes and never opens a browser. If a page requires browser rendering or blocks non-browser fetches, it returns FETCH_REQUIRES_BROWSER or FETCH_BLOCKED; only those codes permit explicit browser fallback.
For either code, create one Session, navigate with browser run, inspect with a read snapshot, reuse the Session for allowed browser work, and close it:
web fetch still runs locally.
Browser Programs
Create an opaque session before raw browser work. Profiles hold cookie/auth state; sessions are browser workspaces within that profile. Adapter commands may omit--session and use their profile’s adapter-default session; pass
--session <session-id> only when intentionally routing an adapter into an
explicit session. Raw browser commands must always pass it. The retired
positional session form is invalid:
session create, session list, and session close accept the universal output
formats. An explicit -f table stays in table format when redirected, while
an empty structured session list remains machine-readable (for example, []
with -f json).
Agents sharing a profile can work in parallel by creating separate Sessions.
An authentication handoff is scoped to the Session that started it: run the
returned verification command verbatim because it includes --session when
needed. session close is blocked while that Session has a live handoff.
Use snapshot for explicit page inspection. act is the default
action-first mode, tree preserves fuller page structure, and read extracts readable article/content text. Exactly one of --file <path> or --stdin is required for run. The CLI reads files locally and
sends source—not the path—to the local daemon. --timeout is in seconds and
--max-output bounds returned results and logs. Successful runs return a
snapshotDiff by default; pass --no-snapshot-diff only when the program is
pure read-only and its result already contains the needed state.
The program runs in a fresh QuickJS sandbox with page, context, browser,
and console globals. page.snapshotForAI() is not available. It can use the
supported Page/Frame/Locator methods and passively inspect request and response
events. It cannot access Node.js, the filesystem, environment variables, raw
CDP endpoints, browser launch/connect APIs, browser-context ownership, or
context.newPage().
Screenshot bytes are written to a Webcmd-owned cache directory and returned as
a receipt.
The public raw-browser surface is tabs, bind, run, and snapshot.
Reusable adapters continue to use the existing IPage API. Playwright-style
programs are for reconnaissance and ad-hoc multi-step work; they are not pasted
into adapter modules.
Top-Level Commands
Output Formats
plain prints key: value lines instead of a table, and prints the bare value when a command returns a single field named response, content, markdown, text, or value. It suits chat-style commands. yml and markdown are accepted aliases for yaml and md.
Agents should use JSON unless they are presenting output to a human.
Reports and status commands
validate, verify, doctor, skills, adapter status, daemon status, and profile list also accept -f/--format:
table rendering, which stays the default. Pass another format to get the underlying result object instead — the validation report for validate, the verify report for verify, the diagnostic report for doctor, and a row set for profile list.
daemon status -f json returns { "running": false } when no daemon is reachable, and otherwise reports running, stale, pid, version, uptimeMs, runtimeConnected, profiles, memoryMB, and port.
profile list returns one row per profile with contextId, alias, default, connected, and runtimeVersion, covering both connected profiles and saved aliases that are not currently connected. If the daemon is unreachable or stale, profile list -f json/-f yaml fails with a DAEMON_UNAVAILABLE error (exit 1) and a restart hint instead of returning [] — an empty list and an unreadable runtime are different facts.
Adapter verification reports
browser verify accepts -f/--format. Its default table rendering is the human progress report; any other format returns the verification result as data instead:
ok, site, command, rowCount, a fixture block (path, exists, action), and a memory block mirroring the site-memory check. Failures replace the prose with structured detail: shapeFailures for row-shape violations, matchFailures for fixture mismatches, and an error object with a code (ADAPTER_NOT_FOUND, ADAPTER_EXEC_FAILED, ADAPTER_OUTPUT_NOT_JSON) when the adapter could not be run or read. The exit code is unchanged in every case, so -f json is safe to add to an existing verification step.
Global Flags
Workspace resolution precedence is
--workspace flag, then WEBCMD_WORKSPACE env var, then an implicit default workspace. The CLI sends the resolved workspace as the X-Webcmd-Workspace header on hosted requests. Local mode has no workspace concept.
Profiles
Profiles keep login state separate. The profile surface depends on the selected mode.--profile <name> values lazily create separate local state; local list, rename, and use are unchanged. In hosted mode, --profile <name> selects a persona within the ambient workspace; an omitted selector or --profile default lazily creates that workspace’s default profile.
Hosted list returns profile rows scoped to the ambient workspace; delete takes an immutable profile ID and returns { "ok": true, "deleted": true }, permanently removing that hosted browser state. Each profile row has id, name, workspace, default, status, createdAt, updatedAt, and lastUsedAt. status is pending or available. Cloud provider identifiers are never exposed.
Prompt example:
Plugins
Local mode supports plugin install, update, list, create, uninstall, catalog, search, and related marketplace commands. The core package includes no site adapters. Search first, then explicitly use the returnedinstallSource:
plugin install github:... only when you already know the source. For missing or unknown sites, plugin search is the freshness boundary; it reads the current catalog instead of relying on package contents.
Hosted mode supports plugin search, plugin install, plugin list, plugin uninstall, plugin update, and plugin create for Webcmd-verified marketplace adapters. Plugin catalog source management remains local-only.
plugin list, plugin search, plugin catalog list, and plugin catalog add accept -f/--format. plugin list -f json returns an array (including [] when no plugins are installed); plugin catalog list -f json returns its catalog object. yml and markdown normalize to yaml and md, and unknown format names are usage errors.
Skills
Bundled agent skills ship with the package.webcmd skills add links them into an agent harness and is part of first-time setup.
skills add prompts for whichever of scope and harness you did not pass. Use --scope <user|project> and --provider <agents|codex|claude> to skip the prompts, or --path <skills-dir> to link into a custom directory. Outside a TTY, and with --json, it never prompts. Run skills update after upgrading the package to refresh the links.
External CLIs
Agents can expose local tools through Webcmd, such asgh, docker, vercel, or internal CLIs.
Prompt example:
Useful Paths
These paths are mostly useful when reviewing an agent’s changes or packaging adapters into plugins.