Navigate
Navigate the current tracked tab to a URL, or create a tab when no current tab is available.
pinchtab nav https://pinchtab.comcurl -X POST http://localhost:9867/navigate \ -H "Content-Type: application/json" \ -d '{"url":"https://pinchtab.com"}'
Response
8f9c7d4e1234567890abcdef12345678 CLI Flags
pinchtab nav <url> auto-starts the default local server when it is not already running. When --server or PINCHTAB_SERVER targets another server, PinchTab connects to that server without auto-starting a new process.
Hidden aliases: goto, navigate, open.
| Flag | Description |
|---|---|
--tab | Reuse existing tab |
--new-tab | Force new tab |
--block-images | Block image loading |
--block-ads | Block ads |
--snap | Output snapshot after navigation |
--snap-diff | Output snapshot diff after navigation |
--print-tab-id | Print only tab ID (auto when piped) |
--json | Full JSON response |
Examples
pinchtab nav https://example.com # Navigate current tab, or create onepinchtab nav https://example.com --snap # Navigate and snapshotTAB=$(pinchtab nav https://example.com) # Capture tab ID for reusepinchtab nav https://other.com --tab "$TAB" # Reuse tabpinchtab nav https://example.com --new-tab # Force another tabpinchtab nav https://example.com --block-images # Skip images
pinchtab nav https://example.com # Navigate current tab, or create onepinchtab nav https://example.com --snap # Navigate and snapshotTAB=$(pinchtab nav https://example.com) # Capture tab ID for reusepinchtab nav https://other.com --tab "$TAB" # Reuse tabpinchtab nav https://example.com --new-tab # Force another tabpinchtab nav https://example.com --block-images # Skip images
API Body Fields
| Field | Description |
|---|---|
url | Target URL (required) |
tabId | Reuse existing tab |
newTab | Force new tab |
blockImages | Block image loading |
blockAds | Block ads |
timeout | Navigation timeout |
waitFor | Wait condition |
waitSelector | Wait for selector |
Behavior
- Top-level
POST /navigateopens a new tab when notabIdis provided. pinchtab nav <url>uses the current tracked tab when one is available; otherwise it opens a new tab.POST /tabs/{id}/navigate,POST /navigatewithtabId, andpinchtab nav <url> --tab <id>reuse the specified tab and make it the current tab for later unscoped operations.--new-tabandnewTab:trueforce a new tab even if another tab is current.- Commands that operate without
--tabuse the current tracked tab. Focusing or using a tab updates that current-tab pointer; if the pointer is stale, PinchTab falls back to the most recently used tracked tab.
Rationale: the CLI keeps one obvious work surface by default. Use --new-tab when you intentionally want another tab, or --tab/tabId when you need a specific tab.