Tabs

Tabs are the main execution surface for browsing, extraction, interaction, and diagnostics.

Use tab-scoped HTTP routes once you already have a tab ID. In the CLI, use the normal top-level browser commands with --tab <id>.

pinchtab tab itself is only for:

  • listing tabs
  • focusing a tab
  • opening a new tab
  • closing a tab

There are no subcommands such as pinchtab tab navigate or pinchtab tab click.

Top-Level Browser Commands

These pages cover the shorthand routes and matching CLI commands:

Open A Tab In A Specific Instance

terminal
curl -X POST http://localhost:9867/instances/inst_ea2e747f/tabs/open \  -H "Content-Type: application/json" \  -d '{"url":"https://pinchtab.com"}'
curl -X POST http://localhost:9867/instances/inst_ea2e747f/tabs/open \  -H "Content-Type: application/json" \  -d '{"url":"https://pinchtab.com"}'
Response
{
  "tabId": "8f9c7d4e1234567890abcdef12345678",
  "url": "https://pinchtab.com",
  "title": "PinchTab"
}

There is still no dedicated instance-scoped tab-open CLI command. The CLI shortcut is:

terminal
pinchtab instance navigate inst_ea2e747f https://pinchtab.com
pinchtab instance navigate inst_ea2e747f https://pinchtab.com

That command opens a tab for the instance and then navigates it.

List Tabs

Active Bridge Or Shorthand Context

terminal
curl http://localhost:9867/tabs# Response (API always returns JSON){  "tabs": [    {      "id": "8f9c7d4e1234567890abcdef12345678",      "url": "https://pinchtab.com",      "title": "PinchTab",      "type": "page"    }  ]}
Response
{
  "tabs": [
    {
      "id": "8f9c7d4e1234567890abcdef12345678",
      "url": "https://pinchtab.com",
      "title": "PinchTab",
      "type": "page"
    }
  ]
}

# CLI Alternative (human-readable by default)
pinchtab tab
# Output: *8f9c7d4e...  https://pinchtab.com  PinchTab

pinchtab tab --json                    # Full JSON response

Notes:

  • GET /tabs is not a fleet-wide inventory
  • in bridge mode or shorthand mode it lists tabs from the active browser context
  • pinchtab tab follows that shorthand behavior

Tabs For One Instance

terminal
curl http://localhost:9867/instances/inst_ea2e747f/tabs
curl http://localhost:9867/instances/inst_ea2e747f/tabs

Tabs Across All Running Instances

terminal
curl http://localhost:9867/instances/tabs
curl http://localhost:9867/instances/tabs

Use GET /instances/tabs when you need the orchestrator-wide view.

Focus, Create, And Close From The CLI

terminal
pinchtab tab                           # list tabspinchtab tab 2                         # focus tab by 1-based indexpinchtab tab 8f9c7d4e1234...           # focus tab by tab IDpinchtab tab new                       # open blank tabpinchtab tab new https://pinchtab.com   # open and navigatepinchtab tab close 8f9c7d4e1234...     # close tab
pinchtab tab                           # list tabspinchtab tab 2                         # focus tab by 1-based indexpinchtab tab 8f9c7d4e1234...           # focus tab by tab IDpinchtab tab new                       # open blank tabpinchtab tab new https://pinchtab.com   # open and navigatepinchtab tab close 8f9c7d4e1234...     # close tab

Numeric arguments are resolved as 1-based indices against GET /tabs. Non-numeric arguments are treated as tab IDs.

Operate On An Existing Tab

Use the tab-scoped HTTP route or the top-level CLI command with --tab.

terminal
pinchtab nav https://pinchtab.com --tab <tabId>
curl -X POST http://localhost:9867/tabs/<tabId>/navigate \  -H "Content-Type: application/json" \  -d '{"url":"https://pinchtab.com"}'

Snapshot

terminal
pinchtab snap --tab <tabId> -i -c
curl "http://localhost:9867/tabs/<tabId>/snapshot?interactive=true&compact=true"

Text

terminal
pinchtab text --tab <tabId> --raw
curl "http://localhost:9867/tabs/<tabId>/text?mode=raw"

Find

terminal
pinchtab find --tab <tabId> "login button"
curl -X POST http://localhost:9867/tabs/<tabId>/find \  -H "Content-Type: application/json" \  -d '{"query":"login button"}'

Actions

terminal
pinchtab click --tab <tabId> e5pinchtab fill --tab <tabId> '#email' 'ada@example.com'pinchtab wait --tab <tabId> 'text:Done'pinchtab network --tab <tabId> --limit 20
curl -X POST http://localhost:9867/tabs/<tabId>/action \  -H "Content-Type: application/json" \  -d '{"kind":"click","ref":"e5"}'

Low-level pointer control uses the same action surface:

terminal
pinchtab mouse move --tab <tabId> e5pinchtab mouse down --tab <tabId> --button leftpinchtab mouse wheel --tab <tabId> 240 --dx 40
curl -X POST http://localhost:9867/tabs/<tabId>/action \  -H "Content-Type: application/json" \  -d '{"kind":"mouse-move","ref":"e5"}'curl -X POST http://localhost:9867/tabs/<tabId>/action \  -H "Content-Type: application/json" \  -d '{"kind":"mouse-down","button":"left"}'curl -X POST http://localhost:9867/tabs/<tabId>/action \  -H "Content-Type: application/json" \  -d '{"kind":"mouse-wheel","x":400,"y":320,"deltaY":240}'

Handoff State

Human handoff is tab-scoped and API-only today.

Current limitation: this is not a blocking pause yet. The tab is marked as paused_handoff, but normal automation is not universally rejected just because that state is present. Treat it as temporary coordination metadata, not as an enforced lockout.

terminal
curl -X POST http://localhost:9867/tabs/<tabId>/handoff \  -H "Content-Type: application/json" \  -d '{"reason":"captcha","timeoutMs":120000}'curl http://localhost:9867/tabs/<tabId>/handoffcurl -X POST http://localhost:9867/tabs/<tabId>/resume \  -H "Content-Type: application/json" \  -d '{"status":"completed","resolvedData":{"operator":"human"}}'
curl -X POST http://localhost:9867/tabs/<tabId>/handoff \  -H "Content-Type: application/json" \  -d '{"reason":"captcha","timeoutMs":120000}'curl http://localhost:9867/tabs/<tabId>/handoffcurl -X POST http://localhost:9867/tabs/<tabId>/resume \  -H "Content-Type: application/json" \  -d '{"status":"completed","resolvedData":{"operator":"human"}}'

Use this when automation must pause for a CAPTCHA, 2FA prompt, login approval, or another human-only step, but pair it with separate ownership/locking if you need hard exclusion today.

Screenshot

terminal
pinchtab screenshot --tab <tabId> -o out.jpg
curl "http://localhost:9867/tabs/<tabId>/screenshot?raw=true" > out.jpg

PDF

terminal
pinchtab pdf --tab <tabId> -o page.pdf
curl "http://localhost:9867/tabs/<tabId>/pdf?raw=true" > page.pdf

Cookies

terminal
curl http://localhost:9867/tabs/<tabId>/cookiescurl -X POST http://localhost:9867/tabs/<tabId>/cookies \  -H "Content-Type: application/json" \  -d '{"cookies":[{"name":"session","value":"abc"}]}'
curl http://localhost:9867/tabs/<tabId>/cookiescurl -X POST http://localhost:9867/tabs/<tabId>/cookies \  -H "Content-Type: application/json" \  -d '{"cookies":[{"name":"session","value":"abc"}]}'

There is no dedicated top-level cookies CLI command today.

Metrics

terminal
curl http://localhost:9867/tabs/<tabId>/metrics
curl http://localhost:9867/tabs/<tabId>/metrics

This reports memory metrics for the tab through the bridge, not a full per-tab performance profile.

Lock And Unlock

Tab locking is API-only.

terminal
curl -X POST http://localhost:9867/tabs/<tabId>/lock \  -H "Content-Type: application/json" \  -d '{"owner":"my-agent","ttl":60}'curl -X POST http://localhost:9867/tabs/<tabId>/unlock \  -H "Content-Type: application/json" \  -d '{"owner":"my-agent"}'
curl -X POST http://localhost:9867/tabs/<tabId>/lock \  -H "Content-Type: application/json" \  -d '{"owner":"my-agent","ttl":60}'curl -X POST http://localhost:9867/tabs/<tabId>/unlock \  -H "Content-Type: application/json" \  -d '{"owner":"my-agent"}'

There are also active-tab forms at POST /lock and POST /unlock.

Important Limits

  • There is no GET /tabs/{id} endpoint for fetching single-tab metadata.
  • GET /tabs and GET /instances/tabs serve different purposes and are not interchangeable.
  • In the CLI, tab-scoped work happens through top-level commands with --tab, not through pinchtab tab <subcommand> variants.
  • There is no dedicated CLI handoff or resume command today.