Skip to content

🐷 Piggy ​

Headless browser automation for TypeScript/Bun/Node.js.

Built on Nothing Browser β€” real BoringSSL TLS, fingerprint spoofing at DocumentCreation, and 100+ APIs for scraping, automation, and data extraction.

⚠️ Version Requirement: Binary v0.1.14+ | Library v0.0.20+

Update instructions | Version Compatibility


Quick Start ​

ts
import piggy from "nothing-browser";

await piggy.launch({ mode: "tab", binary: "headless" });
await piggy.register("example", "https://example.com");

await piggy.example.navigate();
const title = await piggy.example.title();
console.log(title);

await piggy.close();

Why Piggy? ​

FeaturePiggyPuppeteer
Library size~50KB~50MB
CommunicationSocket (fast)CDP (complex)
Anti-detectionBuilt-inPlugins needed
Fingerprint spoofingDocumentCreationRuntime (detectable)
API count100+~50

Piggy is just a command mapper β€” thin wrapper around the Nothing Browser binary.


Known Issues & Platform Quirks ​

πŸͺŸ Windows: file:// URLs Must Use Triple Slash ​

On Windows, Qt WebEngine requires file:/// (three slashes) for local file URLs. Two slashes (file://) causes Qt to interpret the drive letter as a hostname, resulting in a silent load failure.

ts
// ❌ Wrong β€” Qt thinks "C" is the hostname
`file://C:/Users/me/page.html`

// βœ… Correct
`file:///C:/Users/me/page.html`

Also make sure backslashes are converted to forward slashes:

ts
const url = `file:///${join(pagesDir, "page.html").replace(/\\/g, "/")}`

Always prefer import.meta.dir over process.cwd() for building paths β€” it's always the script's own folder regardless of where you ran the script from.


πŸͺŸ Windows: The Pipe Bug (Named Pipe Connection Failure) ​

Symptom:

error: connect ENOENT \\.\pipe\piggy
   errno: -4058,
 syscall: "connect",
 address: "\\\\.\\pipe\\piggy",
    code: "ENOENT"

What happened: The Nothing Browser binary spawned successfully, but Windows didn't let it create the named pipe in time β€” or Windows Defender / UAC blocked the binary from running as a background process entirely.

The fix:

  1. Open the folder containing your binary (e.g. piggy-playground/a/)
  2. Double-click nothing-browser-headful.exe directly
  3. If Windows shows a security prompt, click Run Anyway
  4. Close the browser window that opens
  5. Re-run your script

This whitelists the binary with Windows so it can spawn freely from scripts.

Do we know exactly why this happens? No.
Is it going to be fixed? Also no.
Does the workaround always work? Yes. Will you get such errorsfrequently in windows? Yes.

This issue only affects Windows. Linux and macOS do not require this step.


API Families ​

Core ​

Waiting ​

Interactions ​

Find β€” DOM Query ​

Provide β€” Data Extraction ​

Fetch & Search (Legacy) ​

Capture β€” Network ​

Interception ​

Cookies ​

Session ​

Expose β€” RPC ​

Iframe ​

Captcha & Block ​

Dialog & Upload ​

Human Mode ​

Screenshot & PDF ​

Proxy ​

API Server ​

Storage ​

  • store() β€” Schema-based data persistence

Tabs ​

Events ​

Types ​


Search for an API ​

Looking for something specific?

What you wantUse this
Extract text from a divprovide.text()
Get all links on a pageprovide.links()
Wait for element to appearwait.selector()
Click a button inside iframeiframe.click()
Handle a confirm dialogdialog.accept() / dialog.dismiss()
Upload a filedialog.upload()
Rotate proxiesproxy.next() / proxy.rotation()
Save session to filesession.export() / session.import()
Call Node.js from browserexposeFunction()
Solve CAPTCHAcaptcha.resolve()

Response Samples ​

See exactly what each command returns with real examples:

All examples use the same sample HTML page. Responses shown are real.


Next Steps ​


Nothing Ecosystem Β· Ernest Tech House Β· Kenya Β· 2026

MIT Licensed | Built by Ernest Tech House Β· Kenya Β· 2026