npx skills add https://github.com/pinchtab/pinchtab --skill pinchtabPinchTab 为智能体提供了一个可通过稳定可访问性引用、低令牌文本提取以及持久化配置文件或实例来驱动的浏览器。将其视为一个 CLI 优先的浏览器技能;仅当 CLI 不可用或需要使用 CLI 中尚不存在的配置文件管理路由时,才使用 HTTP API。
首选工具界面:
pinchtab CLI 命令。curl 处理配置文件管理路由或非 shell/API 的备用流程。jq。http://localhost。仅当用户明确提供远程 PinchTab 服务器(以及必要时提供令牌)时才使用。text、snap -i -c、snap -d、find、、、、、、、。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
clickfilltypepressselecthoverscroll每个 PinchTab 自动化都遵循以下模式:
pinchtab nav <url> 或 pinchtab instance navigate <instance-id> <url> 进行导航。pinchtab snap -i -c、pinchtab snap --text 或 pinchtab text 进行观察,然后收集当前的引用,例如 e5。click、fill、type、press、select、hover 或 scroll 与这些新的引用进行交互。规则:
pinchtab text。pinchtab snap -i -c。PinchTab 使用统一的选择器系统。任何以元素为目标的命令都接受以下格式:
| 选择器 | 示例 | 解析方式 |
|---|---|---|
| 引用 | e5 | 快照缓存(最快) |
| CSS | #login、.btn、[data-testid="x"] | document.querySelector |
| XPath | xpath://button[@id="submit"] | CDP 搜索 |
| 文本 | text:Sign In | 可见文本匹配 |
| 语义 | find:login button | 通过 /find 的自然语言查询 |
自动检测:裸 e5 → 引用,#id / .class / [attr] → CSS,//path → XPath。当自动检测不明确时,使用显式前缀(css:、xpath:、text:、find:)。
pinchtab click e5 # 引用
pinchtab click "#submit" # CSS(自动检测)
pinchtab click "text:Sign In" # 文本匹配
pinchtab click "xpath://button[@type]" # XPath
pinchtab fill "#email" "user@test.com" # CSS
pinchtab fill e3 "user@test.com" # 引用
相同的语法通过 selector 字段在 HTTP API 中同样有效:
{"kind": "click", "selector": "text:Sign In"}
{"kind": "fill", "selector": "#email", "text": "user@test.com"}
{"kind": "click", "selector": "e5"}
为向后兼容,仍接受旧的 ref 字段。
仅当您不需要在决定下一步之前检查中间输出时,才使用 &&。
良好示例:
pinchtab nav https://example.com && pinchtab snap -i -c
pinchtab click --wait-nav e5 && pinchtab snap -i -c
pinchtab nav https://example.com --block-images && pinchtab text
当您必须先读取快照输出时,请单独运行命令:
pinchtab nav https://example.com
pinchtab snap -i -c
# 读取引用,选择正确的 e#
pinchtab click e7
pinchtab snap -i -c
在与网站开始交互之前,请选择以下五种模式之一。
对于公开页面、抓取或不需要登录持久化的任务,使用临时实例。
pinchtab instance start
pinchtab instances
# 将 CLI 命令指向您要使用的实例端口。
pinchtab --server http://localhost:9868 nav https://example.com
pinchtab --server http://localhost:9868 text
用于针对同一已认证网站的重复任务。
pinchtab profiles
pinchtab instance start --profile work --mode headed
pinchtab --server http://localhost:9868 nav https://mail.google.com
如果登录信息已存储在该配置文件中,您稍后可以切换到无头模式:
pinchtab instance stop inst_ea2e747f
pinchtab instance start --profile work --mode headless
当您需要一个持久的配置文件且该配置文件尚不存在时使用。
curl -X POST http://localhost:9867/profiles \
-H "Content-Type: application/json" \
-d '{"name":"billing","description":"Billing portal automation","useWhen":"Use for billing tasks"}'
curl -X POST http://localhost:9867/profiles/billing/start \
-H "Content-Type: application/json" \
-d '{"headless":false}'
然后使用 --server 定位返回的端口。
用于 CAPTCHA、MFA 或首次设置。
pinchtab instance start --profile work --mode headed
# 人类在可见的 Chrome 窗口中完成登录。
pinchtab --server http://localhost:9868 nav https://app.example.com/dashboard
pinchtab --server http://localhost:9868 snap -i -c
会话存储后,为后续任务重用同一配置文件。
当智能体无法直接调用 CLI 时使用。
curl http://localhost:9867/health
curl -X POST http://localhost:9867/profiles \
-H "Content-Type: application/json" \
-d '{"name":"work"}'
curl -X POST http://localhost:9867/instances/start \
-H "Content-Type: application/json" \
-d '{"profileId":"work","mode":"headless"}'
curl -X POST http://localhost:9868/action \
-H "Content-Type: application/json" \
-d '{"kind":"click","selector":"e5"}'
pinchtab server # 前台启动服务器
pinchtab daemon install # 安装为系统服务
pinchtab health # 检查服务器状态
pinchtab instances # 列出正在运行的实例
pinchtab profiles # 列出可用配置文件
pinchtab --server http://localhost:9868 snap -i -c # 定位特定实例
pinchtab nav <url>
pinchtab nav <url> --new-tab
pinchtab nav <url> --tab <tab-id>
pinchtab nav <url> --block-images
pinchtab nav <url> --block-ads
pinchtab back # 在历史记录中后退
pinchtab forward # 前进
pinchtab reload # 重新加载当前页面
pinchtab tab # 列出标签页或按 ID 聚焦
pinchtab tab new <url>
pinchtab tab close <tab-id>
pinchtab instance navigate <instance-id> <url>
pinchtab snap
pinchtab snap -i # 仅交互式元素
pinchtab snap -i -c # 交互式 + 紧凑格式
pinchtab snap -d # 与先前快照的差异
pinchtab snap --selector <css> # 限定到 CSS 选择器范围
pinchtab snap --max-tokens <n> # 令牌预算限制
pinchtab snap --text # 文本输出格式
pinchtab text # 页面文本内容
pinchtab text --raw # 原始文本提取
pinchtab find <query> # 语义元素搜索
pinchtab find --ref-only <query> # 仅返回引用
指导原则:
snap -i -c 是查找可操作引用的默认方式。snap -d 是多步骤流程中后续快照的默认方式。text 是阅读文章、仪表板、报告或确认消息的默认方式。find --ref-only 很有用。所有交互命令都接受统一选择器(引用、CSS、XPath、文本、语义)。请参阅上面的选择器部分。
pinchtab click <selector> # 点击元素
pinchtab click --wait-nav <selector> # 点击并等待导航
pinchtab click --x 100 --y 200 # 按坐标点击
pinchtab dblclick <selector> # 双击元素
pinchtab type <selector> <text> # 键入(带按键事件)
pinchtab fill <selector> <text> # 直接设置值
pinchtab press <key> # 按键(Enter、Tab、Escape...)
pinchtab hover <selector> # 悬停元素
pinchtab select <selector> <value> # 选择下拉选项
pinchtab scroll <selector|pixels> # 滚动元素或页面
规则:
fill。type。click --wait-nav。click、press Enter、select 或 scroll 之后立即重新快照。pinchtab screenshot
pinchtab screenshot -o /tmp/pinchtab-page.png # 格式由扩展名决定
pinchtab screenshot -q 60 # JPEG 质量
pinchtab pdf
pinchtab pdf -o /tmp/pinchtab-report.pdf
pinchtab pdf --landscape
仅当任务明确需要且更安全的命令不足时,才使用这些命令。
pinchtab eval "document.title"
pinchtab download <url> -o /tmp/pinchtab-download.bin
pinchtab upload /absolute/path/provided-by-user.ext -s <css>
规则:
eval 用于狭窄的、只读的 DOM 检查,除非用户明确要求页面变更。download 应优先使用安全的临时或工作区路径,而不是任意的文件系统位置。upload 需要用户明确提供或为该任务明确批准的文件路径。curl -X POST http://localhost:9868/navigate \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com"}'
curl "http://localhost:9868/snapshot?filter=interactive&format=compact"
curl -X POST http://localhost:9868/action \
-H "Content-Type: application/json" \
-d '{"kind":"fill","selector":"e3","text":"ada@example.com"}'
curl http://localhost:9868/text
在以下情况下使用 API:
pinchtab nav https://pinchtab.com && pinchtab snap -i -c
pinchtab nav https://example.com/login
pinchtab snap -i -c
pinchtab fill e3 "user@example.com"
pinchtab fill e4 "correct horse battery staple"
pinchtab click --wait-nav e5
pinchtab text
pinchtab nav https://example.com
pinchtab snap -i -c
pinchtab fill e2 "quarterly report"
pinchtab press Enter
pinchtab text
pinchtab nav https://example.com/checkout
pinchtab snap -i -c
pinchtab click e8
pinchtab snap -d -i -c
当您了解页面结构时,可以跳过快照,直接使用 CSS 或文本选择器:
pinchtab click "text:Accept Cookies"
pinchtab fill "#search" "quarterly report"
pinchtab click "xpath://button[@type='submit']"
pinchtab profiles
pinchtab instance start --profile work --mode headed
# 人类登录一次。
pinchtab --server http://localhost:9868 text
pinchtab instance start --profile work --mode headless
pinchtab instance start --profile staging --mode headless
pinchtab instances
然后使用 --server 将每个命令流指向其自己的端口。
text、snap -i -c 和 snap -d。--block-images。pinchtab snap -d。pinchtab text 来确认成功消息、表格更新或导航结果。pinchtab screenshot。PinchTab 是一个完全开源的、仅限本地的浏览器自动化工具:
127.0.0.1。PinchTab 本身不进行任何外部网络调用。每周安装次数
387
代码仓库
GitHub 星标数
8.1K
首次出现
2026年2月18日
安全审计
安装于
opencode351
codex350
gemini-cli346
github-copilot346
cursor345
kimi-cli344
PinchTab gives agents a browser they can drive through stable accessibility refs, low-token text extraction, and persistent profiles or instances. Treat it as a CLI-first browser skill; use the HTTP API only when the CLI is unavailable or you need profile-management routes that do not exist in the CLI yet.
Preferred tool surface:
pinchtab CLI commands first.curl for profile-management routes or non-shell/API fallback flows.jq only when you need structured parsing from JSON responses.http://localhost targets. Only use a remote PinchTab server when the user explicitly provides it and, if needed, a token.text, snap -i -c, snap -d, find, click, fill, type, press, select, hover, scroll.Every PinchTab automation follows this pattern:
pinchtab nav <url> or pinchtab instance navigate <instance-id> <url>.pinchtab snap -i -c, pinchtab snap --text, or pinchtab text, then collect the current refs such as e5.click, fill, type, press, , , or .Rules:
pinchtab text when you need content, not layout.pinchtab snap -i -c when you need actionable elements.PinchTab uses a unified selector system. Any command that targets an element accepts these formats:
| Selector | Example | Resolves via |
|---|---|---|
| Ref | e5 | Snapshot cache (fastest) |
| CSS | #login, .btn, [data-testid="x"] | document.querySelector |
| XPath | xpath://button[@id="submit"] | CDP search |
| Text | text:Sign In |
Auto-detection: bare e5 → ref, #id / .class / [attr] → CSS, //path → XPath. Use explicit prefixes (css:, xpath:, text:, find:) when auto-detection is ambiguous.
pinchtab click e5 # ref
pinchtab click "#submit" # CSS (auto-detected)
pinchtab click "text:Sign In" # text match
pinchtab click "xpath://button[@type]" # XPath
pinchtab fill "#email" "user@test.com" # CSS
pinchtab fill e3 "user@test.com" # ref
The same syntax works in the HTTP API via the selector field:
{"kind": "click", "selector": "text:Sign In"}
{"kind": "fill", "selector": "#email", "text": "user@test.com"}
{"kind": "click", "selector": "e5"}
Legacy ref field is still accepted for backward compatibility.
Use && only when you do not need to inspect intermediate output before deciding the next step.
Good:
pinchtab nav https://example.com && pinchtab snap -i -c
pinchtab click --wait-nav e5 && pinchtab snap -i -c
pinchtab nav https://example.com --block-images && pinchtab text
Run commands separately when you must read the snapshot output first:
pinchtab nav https://example.com
pinchtab snap -i -c
# Read refs, choose the correct e#
pinchtab click e7
pinchtab snap -i -c
Pick one of these five patterns before you start interacting with the site.
Use a temporary instance for public pages, scraping, or tasks that do not need login persistence.
pinchtab instance start
pinchtab instances
# Point CLI commands at the instance port you want to use.
pinchtab --server http://localhost:9868 nav https://example.com
pinchtab --server http://localhost:9868 text
Use this for recurring tasks against the same authenticated site.
pinchtab profiles
pinchtab instance start --profile work --mode headed
pinchtab --server http://localhost:9868 nav https://mail.google.com
If the login is already stored in that profile, you can switch to headless later:
pinchtab instance stop inst_ea2e747f
pinchtab instance start --profile work --mode headless
Use this when you need a durable profile and it does not exist yet.
curl -X POST http://localhost:9867/profiles \
-H "Content-Type: application/json" \
-d '{"name":"billing","description":"Billing portal automation","useWhen":"Use for billing tasks"}'
curl -X POST http://localhost:9867/profiles/billing/start \
-H "Content-Type: application/json" \
-d '{"headless":false}'
Then target the returned port with --server.
Use this for CAPTCHA, MFA, or first-time setup.
pinchtab instance start --profile work --mode headed
# Human completes login in the visible Chrome window.
pinchtab --server http://localhost:9868 nav https://app.example.com/dashboard
pinchtab --server http://localhost:9868 snap -i -c
Once the session is stored, reuse the same profile for later tasks.
Use this when the agent cannot call the CLI directly.
curl http://localhost:9867/health
curl -X POST http://localhost:9867/profiles \
-H "Content-Type: application/json" \
-d '{"name":"work"}'
curl -X POST http://localhost:9867/instances/start \
-H "Content-Type: application/json" \
-d '{"profileId":"work","mode":"headless"}'
curl -X POST http://localhost:9868/action \
-H "Content-Type: application/json" \
-d '{"kind":"click","selector":"e5"}'
If the server is exposed beyond localhost, require a token and use a dedicated automation profile. See TRUST.md and config.md.
pinchtab server # Start server foreground
pinchtab daemon install # Install as system service
pinchtab health # Check server status
pinchtab instances # List running instances
pinchtab profiles # List available profiles
pinchtab --server http://localhost:9868 snap -i -c # Target specific instance
pinchtab nav <url>
pinchtab nav <url> --new-tab
pinchtab nav <url> --tab <tab-id>
pinchtab nav <url> --block-images
pinchtab nav <url> --block-ads
pinchtab back # Navigate back in history
pinchtab forward # Navigate forward
pinchtab reload # Reload current page
pinchtab tab # List tabs or focus by ID
pinchtab tab new <url>
pinchtab tab close <tab-id>
pinchtab instance navigate <instance-id> <url>
pinchtab snap
pinchtab snap -i # Interactive elements only
pinchtab snap -i -c # Interactive + compact
pinchtab snap -d # Diff from previous snapshot
pinchtab snap --selector <css> # Scope to CSS selector
pinchtab snap --max-tokens <n> # Token budget limit
pinchtab snap --text # Text output format
pinchtab text # Page text content
pinchtab text --raw # Raw text extraction
pinchtab find <query> # Semantic element search
pinchtab find --ref-only <query> # Return refs only
Guidance:
snap -i -c is the default for finding actionable refs.snap -d is the default follow-up snapshot for multi-step flows.text is the default for reading articles, dashboards, reports, or confirmation messages.find --ref-only is useful when the page is large and you already know the semantic target.All interaction commands accept unified selectors (refs, CSS, XPath, text, semantic). See the Selectors section above.
pinchtab click <selector> # Click element
pinchtab click --wait-nav <selector> # Click and wait for navigation
pinchtab click --x 100 --y 200 # Click by coordinates
pinchtab dblclick <selector> # Double-click element
pinchtab type <selector> <text> # Type with keystrokes
pinchtab fill <selector> <text> # Set value directly
pinchtab press <key> # Press key (Enter, Tab, Escape...)
pinchtab hover <selector> # Hover element
pinchtab select <selector> <value> # Select dropdown option
pinchtab scroll <selector|pixels> # Scroll element or page
Rules:
fill for deterministic form entry.type only when the site depends on keystroke events.click --wait-nav when a click is expected to navigate.click, press Enter, select, or scroll if the UI can change.pinchtab screenshot
pinchtab screenshot -o /tmp/pinchtab-page.png # Format driven by extension
pinchtab screenshot -q 60 # JPEG quality
pinchtab pdf
pinchtab pdf -o /tmp/pinchtab-report.pdf
pinchtab pdf --landscape
Use these only when the task explicitly requires them and safer commands are insufficient.
pinchtab eval "document.title"
pinchtab download <url> -o /tmp/pinchtab-download.bin
pinchtab upload /absolute/path/provided-by-user.ext -s <css>
Rules:
eval is for narrow, read-only DOM inspection unless the user explicitly asks for a page mutation.download should prefer a safe temporary or workspace path over an arbitrary filesystem location.upload requires a file path the user explicitly provided or clearly approved for the task.curl -X POST http://localhost:9868/navigate \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com"}'
curl "http://localhost:9868/snapshot?filter=interactive&format=compact"
curl -X POST http://localhost:9868/action \
-H "Content-Type: application/json" \
-d '{"kind":"fill","selector":"e3","text":"ada@example.com"}'
curl http://localhost:9868/text
Use the API when:
pinchtab nav https://pinchtab.com && pinchtab snap -i -c
pinchtab nav https://example.com/login
pinchtab snap -i -c
pinchtab fill e3 "user@example.com"
pinchtab fill e4 "correct horse battery staple"
pinchtab click --wait-nav e5
pinchtab text
pinchtab nav https://example.com
pinchtab snap -i -c
pinchtab fill e2 "quarterly report"
pinchtab press Enter
pinchtab text
pinchtab nav https://example.com/checkout
pinchtab snap -i -c
pinchtab click e8
pinchtab snap -d -i -c
When you know the page structure, skip the snapshot and use CSS or text selectors directly:
pinchtab click "text:Accept Cookies"
pinchtab fill "#search" "quarterly report"
pinchtab click "xpath://button[@type='submit']"
pinchtab profiles
pinchtab instance start --profile work --mode headed
# Human signs in once.
pinchtab --server http://localhost:9868 text
pinchtab instance start --profile work --mode headless
pinchtab instance start --profile staging --mode headless
pinchtab instances
Then point each command stream at its own port using --server.
text, snap -i -c, and snap -d before screenshots, PDFs, eval, downloads, or uploads.--block-images for read-heavy tasks that do not need visual assets.pinchtab snap -d after each state-changing action in long workflows.pinchtab text to confirm success messages, table updates, or navigation outcomes.pinchtab screenshot only when visual regressions, CAPTCHA, or layout-specific confirmation matters.PinchTab is a fully open-source, local-only browser automation tool:
127.0.0.1 by default. No external network calls are made by PinchTab itself.Weekly Installs
387
Repository
GitHub Stars
8.1K
First Seen
Feb 18, 2026
Security Audits
Gen Agent Trust HubWarnSocketWarnSnykWarn
Installed on
opencode351
codex350
gemini-cli346
github-copilot346
cursor345
kimi-cli344
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
138,300 周安装
社交媒体内容策略指南:LinkedIn、Twitter、Instagram、TikTok、Facebook平台优化与内容创作模板
303 周安装
data-extractor 数据提取技能:从PDF、Word、Excel等文档自动提取结构化数据
304 周安装
架构决策框架:需求驱动架构设计,ADR记录决策,权衡分析指南
304 周安装
使用reveal.js创建HTML幻灯片 | 交互式演示文稿制作工具 | 代码高亮与动画效果
304 周安装
移动应用发布策略指南:从ASO优化到推广渠道的完整发布计划
304 周安装
计分卡营销系统:四步法生成高转化率潜在客户,互动评估提升线索质量
304 周安装
selecthoverscroll| Visible text match |
| Semantic | find:login button | Natural language query via /find |