Skip to content

Latest commit

 

History

History
220 lines (150 loc) · 6.15 KB

cli.md

File metadata and controls

220 lines (150 loc) · 6.15 KB

tap CLI Reference

Auto-generated by tap docs. Regenerate with mise run docs.

Tap runs host-side JavaScript workflows, discovers reusable site programs, and extracts clean content through the active agent-browser session.

Quick start: tap site list tap site exa/search query="agent-browser" count=5 tap fetch https://example.com tap fetch Extract the current agent-browser tab tap run workflow.js Run a JavaScript browser workflow tap browser snapshot -i Run any agent-browser command tap doctor Check the runtime dependency

Tap inherits AGENT_BROWSER_SESSION and never creates, names, or closes sessions.

Global flags

Flag Description Default Env
--sites-dir Directory containing cached site scripts ~/.cache/tap/sites TAP_SITES_DIR
--verbose Enable verbose logging
--quiet, -q Suppress log output
--local-only Only use scripts from ~/.config/tap/sites/
--no-color Disable colored output NO_COLOR

tap site

Usage: Run site scripts

tap site <script-name> [key=value ...]

Run site-specific JavaScript scripts that extract structured data from websites.

Scripts are organized as site/action and execute in the active agent-browser session selected by AGENT_BROWSER_SESSION.

Scripts auto-sync from the remote catalog every 24 hours into ~/.cache/tap/sites/. Local overrides in ~/.config/tap/sites/ take precedence over cached scripts.

Examples: tap site list List all available scripts tap site hackernews/search query=golang Run a script with arguments tap site info hackernews/search Show script details and args tap site search "weather" Search the online catalog tap site sync Force-refresh the script cache tap site hackernews/top -f json Output as JSON

Flags:

Flag Description Default Env
--format, -f Output format: json, pretty (default), raw pretty

tap site run

Usage: Run a site script

tap site run <script-name> [key=value ...]

Flags:

Flag Description Default Env
--format, -f Output format: json, pretty (default), raw pretty

tap site list

Usage: List all available scripts (grouped by site)

tap site info

Usage: Show detailed info for a script

tap site info <script-name>

tap site search

Usage: Search scripts online by name or description

tap site search <query>

tap site sync

Usage: Sync scripts from the remote catalog

tap fetch

Usage: Extract clean content from a URL or the current agent-browser tab

tap fetch [url]

Navigate to an optional URL and extract the main content with Defuddle. With no URL, extract the active tab without navigating or creating a session.

Examples: tap fetch https://example.com/article Clean Markdown output tap fetch --json https://example.com/article Full metadata as JSON tap fetch Extract current tab

Flags:

Flag Description Default Env
--json Output as JSON with full metadata

tap run

Usage: Run a host-side JavaScript browser workflow

tap run [script.js]

Execute JavaScript that drives the active agent-browser session. Read the workflow from a file, or from stdin when no file (or -) is given.

The runtime exposes browser.cmd(...args), browser.eval(script), tap.site(name, args), console.log(), and shortcuts for open and snapshot.

Examples: tap run workflow.js tap run <<'JS' await browser.open("https://example.com") const page = await browser.snapshot("-i") console.log(page.snapshot) const results = await tap.site("exa/search", {query: "agent browser"}) console.log(JSON.stringify(results)) JS

tap browser

Usage: Run an agent-browser command

tap browser [agent-browser args...]

Pass all arguments, input, output, environment, and exit status through to agent-browser. Tap resolves the same bundled, configured, or PATH executable used by its other commands and does not interpret browser commands.

Common commands: tap browser open https://example.com tap browser snapshot -i tap browser click @e3 tap browser fill @e4 "query" tap browser eval --stdin tap browser network requests --filter api tap browser tab list

Engine selection: tap browser --engine lightpanda open https://example.com AGENT_BROWSER_ENGINE=chrome tap browser --profile Default open https://example.com

Help: tap help browser Show this Tap passthrough guide tap browser --help Show the full version-matched agent-browser help

In forwarded help and output, read a leading "agent-browser" command as "tap browser"; all remaining arguments are unchanged.

tap doctor

Usage: Check Tap and its agent-browser runtime dependency

Checks the resolved agent-browser executable and its Chrome runtime. When agent-browser is missing, rerun Tap's default installer to bootstrap it. --fix delegates runtime repair to an executable that is already installed.

Flags:

Flag Description Default Env
--fix Delegate repairs to agent-browser doctor --fix

tap upgrade

Usage: Upgrade tap to the latest version

Flags:

Flag Description Default Env
--force Upgrade even if already on the latest version

tap skill

Usage: Manage the embedded tap-web skill

The tap-web skill provides AI agent capabilities for web access. It is embedded in the tap binary and can be installed to the skills directory.

tap skill install

Usage: Install or update the embedded skill

Flags:

Flag Description Default Env
--force Reinstall even if already up to date
--path, --dir Custom installation directory (default: ~/.config/tap/skills/tap-web/) TAP_SKILL_DIR

tap docs

Usage: Print the full command reference as Markdown