Documentation Index Fetch the complete documentation index at: https://mintlify.com/pinchtab/pinchtab/llms.txt
Use this file to discover all available pages before exploring further.
Tab Management
Tabs are individual browser pages within an instance. Each tab has its own navigation history, DOM, and execution context.
List Tabs
Output:
{
"tabs" : [
{
"id" : "tab_abc123" ,
"url" : "https://example.com" ,
"title" : "Example Domain" ,
"active" : true
},
{
"id" : "tab_xyz789" ,
"url" : "https://github.com" ,
"title" : "GitHub" ,
"active" : false
}
]
}
Filter Tabs
# Get all tab IDs
pinchtab tabs | jq -r '.tabs[] | .id'
# Count tabs
pinchtab tabs | jq '.tabs | length'
# Get active tab
pinchtab tabs | jq '.tabs[] | select(.active == true)'
# Find tab by URL
pinchtab tabs | jq '.tabs[] | select(.url | contains("github"))'
Create Tab
Example:
pinchtab tab new https://example.com
Output:
{
"action" : "new" ,
"tabId" : "tab_abc123" ,
"url" : "https://example.com"
}
Create without URL (blank tab):
Capture Tab ID
TAB = $( pinchtab tab new https://example.com | jq -r .tabId )
echo "Tab ID: $TAB "
Close Tab
pinchtab tab close < tab-i d >
Example:
pinchtab tab close tab_abc123
Output:
{
"action" : "close" ,
"tabId" : "tab_abc123" ,
"status" : "closed"
}
Close All Tabs
pinchtab tabs | jq -r '.tabs[] | .id' | xargs -I {} pinchtab tab close {}
Tab Operations
Perform operations on specific tabs using the pinchtab tab <operation> <tabId> pattern.
Navigate Tab
pinchtab tab navigate < tab-i d > < ur l > [flags]
Example:
pinchtab tab navigate tab_abc123 https://github.com
Flags:
Navigation timeout in seconds. pinchtab tab navigate tab_abc123 https://example.com --timeout 30
Block image loading for faster navigation. pinchtab tab navigate tab_abc123 https://example.com --block-images
Block known ad domains. pinchtab tab navigate tab_abc123 https://example.com --block-ads
Snapshot Tab
pinchtab tab snapshot < tab-i d > [flags]
Example:
pinchtab tab snapshot tab_abc123 -i -c
Flags:
-i, --interactive - Interactive elements only
-c, --compact - Compact format
-d, --diff - Show only changes
See Snapshot Command for detailed flag documentation.
Screenshot Tab
pinchtab tab screenshot < tab-i d > [flags]
Example:
pinchtab tab screenshot tab_abc123 -o screenshot.png
Flags:
Output filename. pinchtab tab screenshot tab_abc123 -o page.png
JPEG quality (0-100). pinchtab tab screenshot tab_abc123 -o page.jpg -q 90
Click Element in Tab
pinchtab tab click < tab-i d > < re f >
Example:
pinchtab tab click tab_abc123 e5
Type Text in Tab
pinchtab tab type < tab-i d > < re f > < tex t >
Example:
pinchtab tab type tab_abc123 e12 "hello world"
pinchtab tab fill < tab-i d > < re f > < tex t >
Example:
pinchtab tab fill tab_abc123 e12 "value"
Press Key in Tab
pinchtab tab press < tab-i d > < ke y >
Example:
pinchtab tab press tab_abc123 Enter
pinchtab tab press tab_abc123 Tab
pinchtab tab press tab_abc123 Escape
pinchtab tab scroll < tab-i d > < direction | pixels >
Examples:
# Scroll by direction
pinchtab tab scroll tab_abc123 down
pinchtab tab scroll tab_abc123 up
# Scroll by pixels
pinchtab tab scroll tab_abc123 500
Select Dropdown in Tab
pinchtab tab select < tab-i d > < re f > < valu e >
Example:
pinchtab tab select tab_abc123 e5 option2
Hover Element in Tab
pinchtab tab hover < tab-i d > < re f >
Example:
pinchtab tab hover tab_abc123 e5
Focus Element in Tab
pinchtab tab focus < tab-i d > < re f >
Example:
pinchtab tab focus tab_abc123 e12
pinchtab tab text < tab-i d > [--raw]
Example:
# JSON output
pinchtab tab text tab_abc123
# Raw text
pinchtab tab text tab_abc123 --raw
Evaluate JavaScript in Tab
pinchtab tab eval < tab-i d > < expressio n >
Examples:
# Get document title
pinchtab tab eval tab_abc123 "document.title"
# Count links
pinchtab tab eval tab_abc123 "document.querySelectorAll('a').length"
# Complex expression
pinchtab tab eval tab_abc123 'JSON.stringify({title: document.title, url: location.href})'
Export Tab as PDF
pinchtab tab pdf < tab-i d > [flags]
Example:
pinchtab tab pdf tab_abc123 -o page.pdf
Flags:
-o, --output - Output filename
--landscape - Landscape orientation
--scale - Print scale (0.1-2.0)
See PDF export documentation for all flags.
Get Tab Cookies
pinchtab tab cookies < tab-i d >
Example:
pinchtab tab cookies tab_abc123
Lock Tab
Lock a tab to prevent concurrent access:
pinchtab tab lock < tab-i d > [--owner < owne r > ] [--ttl < second s > ]
Example:
# Lock for 60 seconds
pinchtab tab lock tab_abc123 --owner my-agent --ttl 60
Owner identifier for the lock. pinchtab tab lock tab_abc123 --owner agent-1
Lock time-to-live in seconds. pinchtab tab lock tab_abc123 --ttl 120
Unlock Tab
pinchtab tab unlock < tab-i d > [--owner < owne r > ]
Example:
pinchtab tab unlock tab_abc123 --owner my-agent
List Tab Locks
pinchtab tab locks < tab-i d >
Example:
pinchtab tab locks tab_abc123
Get Tab Info
pinchtab tab info < tab-i d >
Example:
pinchtab tab info tab_abc123
Output:
{
"id" : "tab_abc123" ,
"url" : "https://example.com" ,
"title" : "Example Domain" ,
"active" : true ,
"loading" : false
}
Common Workflows
Multi-Tab Navigation
# Open multiple tabs
TAB1 = $( pinchtab tab new https://github.com | jq -r .tabId )
TAB2 = $( pinchtab tab new https://example.com | jq -r .tabId )
TAB3 = $( pinchtab tab new https://google.com | jq -r .tabId )
# List all tabs
pinchtab tabs
# Take screenshots of all tabs
pinchtab tab screenshot $TAB1 -o github.png
pinchtab tab screenshot $TAB2 -o example.png
pinchtab tab screenshot $TAB3 -o google.png
# Close all tabs
pinchtab tab close $TAB1
pinchtab tab close $TAB2
pinchtab tab close $TAB3
Tab Isolation
# Each tab has isolated state
TAB = $( pinchtab tab new https://example.com | jq -r .tabId )
# Set cookies in this tab
curl -X POST http://localhost:9867/tabs/ $TAB /cookies \
-d '{"name": "session", "value": "abc123"}'
# Cookies only affect this tab
pinchtab tab cookies $TAB
Parallel Tab Operations
# Get all tab IDs
TABS = $( pinchtab tabs | jq -r '.tabs[] | .id' )
# Take screenshots in parallel
for TAB in $TABS ; do
(
FILE = "screenshot-${ TAB }.png"
pinchtab tab screenshot $TAB -o $FILE
echo "Saved: $FILE "
) &
done
wait
echo "All screenshots complete"
Tab Locks for Coordination
# Agent 1: Lock tab
TAB = $( pinchtab tabs | jq -r '.tabs[0].id' )
pinchtab tab lock $TAB --owner agent-1 --ttl 120
# Do work on tab
pinchtab tab navigate $TAB https://example.com
pinchtab tab snapshot $TAB -i
# Release lock
pinchtab tab unlock $TAB --owner agent-1
# Agent 2: Can now lock same tab
pinchtab tab lock $TAB --owner agent-2 --ttl 120
Troubleshooting
Tab Not Found
tab not found: tab_abc123
Solution:
# List current tabs
pinchtab tabs
# Verify tab ID
pinchtab tabs | jq -r '.tabs[] | .id'
Too Many Tabs
max tabs limit reached (20)
Solution:
# Close unused tabs
pinchtab tabs | jq -r '.tabs[] | .id' | head -10 | xargs -I {} pinchtab tab close {}
# Or increase limit
export BRIDGE_MAX_TABS = 50
pinchtab
Tab Lock Conflict
Solution:
# Check lock status
pinchtab tab locks tab_abc123
# Wait for lock to expire (TTL)
# Or force unlock (if you own it)
pinchtab tab unlock tab_abc123 --owner agent-1
Tab API Endpoints
Direct HTTP API access:
# List tabs
curl http://localhost:9867/tabs
# Create tab
curl -X POST http://localhost:9867/tab \
-H "Content-Type: application/json" \
-d '{"action": "new", "url": "https://example.com"}'
# Close tab
curl -X POST http://localhost:9867/tab \
-H "Content-Type: application/json" \
-d '{"action": "close", "tabId": "tab_abc123"}'
# Navigate tab
curl -X POST http://localhost:9867/tabs/tab_abc123/navigate \
-H "Content-Type: application/json" \
-d '{"url": "https://github.com"}'
# Snapshot tab
curl "http://localhost:9867/tabs/tab_abc123/snapshot?interactive=true&compact=true"
# Screenshot tab
curl "http://localhost:9867/tabs/tab_abc123/screenshot?raw=true" -o screenshot.png
Next Steps
Navigation Navigate tabs to URLs
Snapshot Capture tab structure
Actions Interact with tab elements
Instance Management Manage browser instances