Turn websites, browser sessions, desktop apps, and local tools into deterministic command-line surfaces for people and AI agents.
Webcmd gives you one command surface for three kinds of automation:
- Use built-in adapters for sites like Reddit, Hacker News, LinkedIn, Twitter/X, TikTok, Amazon, PubMed, ChatGPT, Claude, Gemini, NotebookLM, and many more.
- Let AI agents operate a real browser with
webcmd browser <session> ...primitives: open pages, inspect DOM snapshots, click, type, select, extract, capture network calls, and verify flows. - Wrap local tools and desktop apps so agents can discover and invoke
gh,docker,vercel, Electron apps, and other command surfaces through the samewebcmd ...entrypoint.
Webcmd requires Node.js >= 20.
node --version
npm install -g @agentrhq/webcmdwebcmd doctordoctor checks the Webcmd browser bridge: daemon status, runtime wiring, profile selection, and a live connectivity probe. Pure public adapters and local passthrough commands do not need a green browser check, but COOKIE, INTERCEPT, UI, and webcmd browser workflows do.
webcmd list
webcmd list -f json
webcmd reddit --help
webcmd reddit hot --helpwebcmd list -f json is the source of truth for agents. It emits one row per command with the site, command name, arguments, output columns, browser requirement, and strategy.
webcmd hackernews top --limit 5
webcmd reddit popular --limit 5
webcmd pubmed search "agentic browser automation" --limit 5 -f jsonUse Webcmd directly when you want a reliable command instead of a live browser session:
webcmd list
webcmd <site> --help
webcmd <site> <command> --help
webcmd <site> <command> -f jsonThe everyday surface is intentionally small:
webcmd listshows every registered adapter and external command.webcmd <site> <command> ...runs a built-in, plugin, or private adapter.webcmd external register <name>exposes a local CLI through the same discovery surface.webcmd doctordiagnoses browser connectivity for authenticated or UI-driven commands.
For example:
webcmd hackernews top --limit 10
webcmd reddit subreddit programming --limit 10
webcmd github whoami
webcmd gh pr list --limit 5Adapter commands are tagged by strategy:
| Strategy | What it means |
|---|---|
PUBLIC |
No browser or login. Webcmd can call a public endpoint or page directly. |
COOKIE |
Uses the logged-in Webcmd browser profile for authenticated reads. |
INTERCEPT |
Uses the browser to capture a signed or stateful request before replaying it. |
UI |
Drives the page UI directly. |
LOCAL |
Talks to a local app, service, or CLI surface. |
Output formats are consistent across adapters:
webcmd hackernews top -f table
webcmd hackernews top -f json
webcmd hackernews top -f yaml
webcmd hackernews top -f md
webcmd hackernews top -f csvAgents usually want -f json; humans usually want the default table.
Webcmd is designed to be driven by coding agents such as Codex, Claude Code, Cursor, and similar tools.
Install Webcmd skills into the agent environment with your agent's skill manager:
npx skills add agentrhq/webcmdOr install/copy only the skills you need from skills/ into your agent's skills root. These skills teach agents when to use adapters, when to drive the browser, how to author new adapters, and how to repair failing commands.
| Skill | When to use |
|---|---|
webcmd-usage |
Orient an agent to Webcmd commands, formats, strategies, plugins, and external CLIs. |
webcmd-browser |
Drive a real browser ad hoc: inspect, click, type, extract, network, tabs, waits. |
webcmd-adapter-author |
Write or extend a reusable site adapter. |
webcmd-autofix |
Repair an adapter after selectors, APIs, or response shapes drift. |
webcmd-browser-sitemap |
Use recorded site knowledge while driving a browser task. |
webcmd-sitemap-author |
Capture or update reusable sitemap knowledge for future agents. |
smart-search |
Route search and research requests to the right adapter. |
The common agent workflow is:
webcmd list -f json
webcmd <site> <command> -f json
webcmd <site> <command> --trace retain-on-failure -f jsonStart with adapters. Fall back to webcmd browser only when no adapter covers the task or you are debugging/building one.
webcmd browser gives agents a stable, structured interface to a real browser. Commands use a session name immediately after browser:
webcmd browser work open https://example.com
webcmd browser work state
webcmd browser work click --role link --name "Learn more"
webcmd browser work type --role textbox --name Email "[email protected]"
webcmd browser work keys Enter
webcmd browser work extract
webcmd browser work closeUseful browser primitives include:
| Area | Commands |
|---|---|
| Navigation | open, back, wait, scroll, close |
| Inspection | state, find, get, frames, screenshot, extract |
| Interaction | click, type, fill, select, keys, hover, focus, check, uncheck, upload, drag |
| Network | network, network --detail <key>, network --filter <fields> |
| Tabs | tab list, tab new, tab select, tab close, bind, unbind |
| Adapter work | init, verify, analyze |
Every interaction command returns structured data: match count, target identity, confidence level, and machine-readable errors. That contract is why agents can recover from mild DOM drift instead of guessing.
Named profiles let Webcmd keep separate browser identities:
webcmd profile list
webcmd profile rename <context-id> work
webcmd profile use work
webcmd --profile work browser work stateIf multiple browser profiles are connected and no default is selected, Webcmd asks you to choose rather than guessing.
Webcmd ships a large adapter registry. The list changes over time, so use webcmd list -f json for the current surface. Highlights include:
| Site/App | Example commands |
|---|---|
hackernews |
top, new, best, ask, show, jobs, search, read, user |
reddit |
hot, popular, search, subreddit, read, user, comment, save, upvote, subscribe |
linkedin |
search, people-search, jobs-preferences, job-detail, profile-read, posts, inbox, safe-send |
twitter |
trending, search, timeline, tweets, post, profile, bookmarks, notifications, follow, unfollow |
tiktok |
search, explore, user, creator-videos, notifications, follow, comment, like, save |
amazon |
search, product, offer, bestsellers, new-releases, movers-shakers, discussion |
pubmed |
search, article, author, citations, clinical-trial, journal, mesh, related, review |
chatgpt |
ask, send, new, read, history, detail, image, deep-research-result, model |
claude |
ask, send, new, read, history, detail, status |
gemini |
ask, new, image, deep-research, deep-research-result, models |
notebooklm |
list, open, summary, source-list, source-get, source-fulltext, generate-audio, generate-slides |
Current registry size is generated from cli-manifest.json; this README intentionally lists highlights, not a frozen catalog.
Webcmd can expose existing command-line tools through the same discovery and invocation surface:
webcmd external install gh
webcmd external register my-tool \
--binary my-tool \
--install "npm i -g my-tool" \
--desc "My internal CLI"
webcmd external list
webcmd gh pr list --limit 5
webcmd docker psBuilt-in external entries include common tools such as gh, docker, vercel, wrangler, obsidian, longbridge, ntn, tg, discord, and wx. User overrides live in ~/.webcmd/external-clis.yaml.
Plugins let you install third-party adapter packs without patching the core registry:
webcmd plugin install github:user/repo
webcmd plugin list -f json
webcmd plugin update --all
webcmd plugin uninstall <name>
webcmd plugin create <name>Use plugins for private company workflows, community adapters, or experiments that are not ready for the built-in registry.
When a site is not covered yet, author a reusable adapter instead of leaving an agent to click through the same browser flow every time.
webcmd browser init <site>/<command>
webcmd validate <site>/<command>
webcmd verify <site>/<command> --smoke
webcmd browser work verify <site>/<command>Adapter files import the public Webcmd registry/error APIs:
import { cli, Strategy } from '@agentrhq/webcmd/registry';
import { CommandExecutionError } from '@agentrhq/webcmd/errors';Private adapters can live in ~/.webcmd/clis/<site>/<command>.js; upstream adapters live in clis/. For the full authoring workflow, install and use webcmd-adapter-author.
| Variable | Default | Description |
|---|---|---|
WEBCMD_PROFILE |
none | Browser runtime profile alias/context ID to use when multiple profiles are available. |
WEBCMD_WINDOW |
command-specific | foreground or background browser window mode. |
WEBCMD_BROWSER_CONNECT_TIMEOUT |
45 |
Seconds to wait for the browser bridge. |
WEBCMD_BROWSER_COMMAND_TIMEOUT |
60 |
Seconds to wait for one browser command. |
WEBCMD_CDP_ENDPOINT |
none | Manual CDP endpoint for remote browsers or Electron apps. |
WEBCMD_CDP_TARGET |
none | Filter CDP targets by URL substring. |
WEBCMD_CACHE_DIR |
~/.webcmd/cache |
Browser state and network capture cache. |
WEBCMD_VERBOSE |
false |
Enable verbose logs. Also enabled by -v. |
Common paths:
| Path | Purpose |
|---|---|
~/.webcmd/ |
User-level Webcmd state. |
~/.webcmd/clis/ |
Private adapters. |
~/.webcmd/cache/browser-network/ |
Cached browser network captures. |
~/.webcmd/external-clis.yaml |
User external CLI registry entries. |
~/.agents/skills/ |
Common global skills install target for agent skill managers. |
.agents/skills/ |
Common workspace-local skills install target. |
- Browser bridge is unavailable: run
webcmd doctor -vand follow the daemon/profile/runtime hint it prints. - Multiple profiles are connected: run
webcmd profile list, thenwebcmd profile use <name>or pass--profile <name>. - Authenticated adapter returns empty or unauthorized: log into the target site in the Webcmd-managed browser profile, then retry.
- A site changed and an adapter fails: rerun with
--trace retain-on-failure -f json, inspect the trace summary, and usewebcmd-autofix. - A browser target is stale: run
webcmd browser <session> stateagain and use the fresh numeric ref or locator. - Node errors on startup: Webcmd requires Node.js >= 20. Check
node --version.
npm install
npm test
npm run typecheck
npm run buildRelease engineering, Conventional Commits, CI, and npm publishing notes live in CONTRIBUTING.md.
Released under the terms in LICENSE.