tap
QuickJS first, browser fallback when needed

๐Ÿšฐ Tap into any website
from your terminal

A Go library and CLI that runs JavaScript scripts against real websites โ€” fast via QuickJS, with full browser fallback. Also extracts clean content from any URL.

Get started in seconds

Install the CLI or use as a Go library

CLI
go install github.com/vaayne/tap/cmd/tap@latest
Library
go get github.com/vaayne/tap

How it works

Two commands, one shared transport layer

                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                โ”‚       Shared Transport Layer     โ”‚
                โ”‚  Level 1: HTTP  โ”‚  Level 2: CDP  โ”‚
                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚                โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚    tap site     โ”‚    โ”‚    tap fetch       โ”‚
          โ”‚  QuickJS โ†’ CDP  โ”‚    โ”‚  HTTP โ†’ CDP        โ”‚
          โ”‚  โ†’ structured   โ”‚    โ”‚  โ†’ defuddle        โ”‚
          โ”‚    JSON         โ”‚    โ”‚  โ†’ markdown/HTML   โ”‚
          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Transport Layer

Shared HTTP client and headless Chrome (CDP), configured once and used by all consumers.

Site Scripts

Predefined recipes that fetch structured data. QuickJS first, Chrome fallback for pages needing cookies or DOM.

Content Extraction

Generic clean content from any URL via go-defuddle. Direct HTTP first, browser for JS-rendered pages.

Usage examples

Pipe to jq, combine with other tools

Run site scripts
$ tap site list
$ tap site v2ex/hot
$ tap site twitter/search query="claude code"
$ tap site hackernews/top | jq '.stories[:3]'
Extract clean content
$ tap fetch https://example.com/article
$ tap fetch --json https://example.com/article
106Scripts
44Sites
GoLanguage

Standing on the shoulders of giants

Based on bb-sites and fully compatible with bb-browser