npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pinchtab

v0.8.1

Published

Browser control API for AI agents

Readme

Pinchtab npm

Browser control API for AI agents — Node.js SDK + CLI wrapper.

Installation

npm install pinchtab

or globally:

npm install -g pinchtab

On install, the postinstall script automatically:

  1. Detects your OS and CPU architecture (darwin/linux/windows, amd64/arm64)
  2. Downloads the precompiled Pinchtab binary from GitHub Releases
    • Example: pinchtab-darwin-amd64, pinchtab-linux-arm64.exe (Windows)
  3. Verifies integrity (SHA256 checksum from checksums.txt)
  4. Stores in ~/.pinchtab/bin/0.7.1/ (version-specific to avoid conflicts)
  5. Makes it executable

Requirements:

  • Internet connection on first install (to download binary from GitHub Releases)
  • Node.js 16+
  • macOS, Linux, or Windows

Proxy Support

Works with corporate proxies. Set standard environment variables:

npm install --https-proxy https://proxy.company.com:8080 pinchtab
# or
export HTTPS_PROXY=https://user:[email protected]:8080
npm install pinchtab

Quick Start

Start the server

pinchtab serve --port 9867

Use the SDK

import Pinchtab from 'pinchtab';

const pinch = new Pinchtab({ port: 9867 });

// Start the server
await pinch.start();

// Take a snapshot
const snapshot = await pinch.snapshot({ refs: 'role' });
console.log(snapshot.html);

// Click on an element
await pinch.click({ ref: 'e42' });

// Lock a tab
await pinch.lock({ tabId: 'tab1', timeoutMs: 5000 });

// Stop the server
await pinch.stop();

API

new Pinchtab(options)

Create a Pinchtab client.

Options:

  • baseUrl (string): API base URL. Default: http://localhost:9867
  • timeout (number): Request timeout in ms. Default: 30000
  • port (number): Port to run on. Default: 9867

start(binaryPath?)

Start the Pinchtab server process.

stop()

Stop the Pinchtab server process.

snapshot(params?)

Take a snapshot of the current tab.

Params:

  • refs ('role' | 'aria'): Reference system
  • selector (string): CSS selector filter
  • maxTokens (number): Token limit
  • format ('full' | 'compact'): Response format

click(params)

Click on an element.

Params:

  • ref (string): Element reference
  • targetId (string): Optional target tab ID

lock(params) / unlock(params)

Lock/unlock a tab.

createTab(params)

Create a new tab.

Params:

  • url (string): Tab URL
  • stealth ('light' | 'full'): Stealth level

CLI

pinchtab serve [--port PORT]
pinchtab --version
pinchtab --help

Shell Completion

After installing the CLI globally, you can generate shell completions:

# Generate and install zsh completions
pinchtab completion zsh > "${fpath[1]}/_pinchtab"

# Generate bash completions
pinchtab completion bash > /etc/bash_completion.d/pinchtab

# Generate fish completions
pinchtab completion fish > ~/.config/fish/completions/pinchtab.fish

Using a Custom Binary

For Docker, development, or other custom setups:

PINCHTAB_BINARY_PATH=/path/to/pinchtab npx pinchtab serve

Or in code:

const pinch = new Pinchtab();
const binaryPath = '/custom/path/to/pinchtab';
await pinch.start(binaryPath);

Troubleshooting

Binary not found or "file not found" error:

Check if the release has binaries:

# Should show pinchtab-darwin-arm64, pinchtab-linux-x64, etc.
curl -s https://api.github.com/repos/pinchtab/pinchtab/releases/latest | jq '.assets[].name'

If no binaries (only Docker images), rebuild with a newer release:

npm rebuild pinchtab

Or use a custom binary:

export PINCHTAB_BINARY_PATH=/path/to/pinchtab
npm rebuild pinchtab

Behind a proxy:

export HTTPS_PROXY=https://proxy:port
npm rebuild pinchtab

Using a pre-built binary:

PINCHTAB_BINARY_PATH=/path/to/binary npm rebuild pinchtab

Future: OptionalDependencies Pattern (v1.0)

In a future major version, we plan to migrate to the modern optionalDependencies pattern used by esbuild, Biome, Turbo, etc. This will split platform-specific binaries into separate npm packages (@pinchtab/cli-darwin-arm64, etc.) for zero postinstall network overhead and perfect offline support.

License

MIT