What you control │ What it is │ Identified by─────────────────────────┼──────────────────────────┼─────────────────────PinchTab Orchestrator │ HTTP server controller │ port (9867 default)Instance │ Chrome process │ inst_XXXXXXXX (hash ID)Profile (optional) │ Browser state directory │ prof_XXXXXXXX (hash ID)Tab │ Single webpage │ tab_XXXXXXXX (hash ID)
# Start orchestrator (default: port 9867)pinchtab# Listening on http://localhost:9867# Or specify portBRIDGE_PORT=9870 pinchtab# Listening on http://localhost:9870
The orchestrator has a built-in dashboard at http://localhost:9867/dashboard where you can view all instances, profiles, and tabs in real-time.
Identified by instance ID: inst_XXXXXXXX (hash-based, stable)
Auto-allocated to unique port in 9868-9968 range
Lazy Chrome initialization - starts on first request, not at creation
Key constraint: One instance = one Chrome process = zero or one profile.You cannot share a single instance across multiple profiles. Each instance has its own isolated state.
Multiple tabs can share the same profile (and its state)
Identified by profile ID: prof_XXXXXXXX (hash-based, stable)
Useful for: user accounts, login sessions, multi-tenant workflows
Persistent across instance restarts
Key constraint: Instance without a profile = ephemeral, no persistent state across restarts.If you don’t specify a profile, PinchTab creates a temporary auto-generated profile that’s deleted when the instance stops.
# Create profiles for each userpinchtab profile create alicepinchtab profile create bob# Start instances with profilescurl -X POST http://localhost:9867/instances/start \ -d '{"profileId": "alice-profile-id"}'curl -X POST http://localhost:9867/instances/start \ -d '{"profileId": "bob-profile-id"}'# Each instance has isolated cookies/auth
# Start instance with persistent profilecurl -X POST http://localhost:9867/instances/start \ -d '{"profileId": "work"}'# Navigate and log incurl -X POST http://localhost:9867/instances/inst_xyz/navigate \ -d '{"url": "https://example.com/login"}'# ... fill login form, click submit ...# Later (even after instance restart): Profile is persistentpinchtab instance launch # Or restart orchestrator# Cookies intact, still logged in via profile's saved state
# Terminal 1: Start orchestratorpinchtab# Terminal 2: Create instanceINST=$(pinchtab instance launch --mode headless)# Returns: inst_0a89a5bb# Create multiple tabs in the same instancecurl -X POST http://localhost:9867/instances/$INST/tabs/open \ -d '{"url":"https://example.com"}'curl -X POST http://localhost:9867/instances/$INST/tabs/open \ -d '{"url":"https://google.com"}'# List all tabs across all instancescurl http://localhost:9867/tabs | jq .# Or tabs in specific instancecurl http://localhost:9867/instances/$INST/tabs | jq .
# Create persistent profiles for Alice and Bobpinchtab profile create alicepinchtab profile create bob# Get profile IDsALICE_ID=$(pinchtab profiles | jq -r '.[] | select(.name=="alice") | .id')BOB_ID=$(pinchtab profiles | jq -r '.[] | select(.name=="bob") | .id')# Start instance for AliceINST_ALICE=$(curl -X POST http://localhost:9867/instances/start \ -d '{"profileId":"'$ALICE_ID'"}' | jq -r '.id')# Start instance for BobINST_BOB=$(curl -X POST http://localhost:9867/instances/start \ -d '{"profileId":"'$BOB_ID'"}' | jq -r '.id')# Create tabs in both instances with isolated cookiescurl -X POST http://localhost:9867/instances/$INST_ALICE/tabs/open \ -d '{"url":"https://app.example.com"}'curl -X POST http://localhost:9867/instances/$INST_BOB/tabs/open \ -d '{"url":"https://app.example.com"}'# Login in each instance separately — profiles keep sessions isolated
# Create instance without persistent profile (temporary auto-generated)INST=$(pinchtab instance launch)# Create tab, use itcurl -X POST http://localhost:9867/instances/$INST/tabs/open \ -d '{"url":"https://example.com"}'# ... work ...# Stop instancepinchtab instance stop $INST# Tab is gone, all cookies gone — clean slate next time
# Create instance (returns with status "starting")INST=$(pinchtab instance launch | jq -r '.id')# Poll until running (monitor's health check initializes Chrome)while true; do STATUS=$(curl http://localhost:9867/instances/$INST | jq -r '.status') if [ "$STATUS" == "running" ]; then echo "Instance ready!" break fi echo "Instance status: $STATUS, waiting..." sleep 0.5done# Now safe to make requests to the instancecurl -X POST http://localhost:9867/instances/$INST/navigate \ -d '{"url":"https://example.com"}'