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

@erdinccurebal/webcli

v0.1.0

Published

Headless browser CLI — navigate, scrape, and interact from the terminal

Downloads

100

Readme

webcli

Headless browser CLI for AI coding agents. Control a real Chromium browser from the command line.

Built for Claude Code and similar AI-powered development tools that need to interact with web pages programmatically.

Features

  • 30+ commands — navigate, read page content, interact with elements, take screenshots
  • Persistent daemon — browser stays open between commands, no startup overhead
  • Multi-tab — manage multiple named browser tabs simultaneously
  • Anti-detection — realistic user-agent, webdriver flag removal, configurable viewport
  • Session persistence — cookies and localStorage persist across daemon restarts
  • JSON output — structured output for programmatic consumption
  • Headed/headless — toggle via config for sites with bot detection

Installation

npm install -g @erdinccurebal/webcli
npx playwright install chromium

Quick Start

webcli go https://example.com          # Navigate (auto-starts daemon)
webcli source                           # Read page text
webcli links                            # List all links
webcli click "More information..."      # Click by visible text
webcli screenshot -o page.png           # Take screenshot
webcli stop                             # Stop daemon

Commands

Navigation

| Command | Description | |---------|-------------| | webcli go <url> | Navigate to URL | | webcli back | Go back in history | | webcli forward | Go forward in history | | webcli reload | Reload current page |

Options for go: -w, --wait <strategy>domcontentloaded (default), networkidle, load

Reading

| Command | Description | |---------|-------------| | webcli source | Get visible text content of the page | | webcli html <selector> | Get innerHTML of a specific element | | webcli attr <selector> <attribute> | Get an element's attribute value | | webcli links | List all links (text + href) | | webcli forms | List all forms with their inputs | | webcli eval <js> | Execute JavaScript and return result |

Interaction

| Command | Description | |---------|-------------| | webcli click <text> | Click element by visible text | | webcli clicksel <selector> | Click element by CSS selector | | webcli focus <selector> | Focus element by CSS selector | | webcli type <text> | Type text with keyboard | | webcli fill <selector> <value> | Fill an input field | | webcli select <selector> <value> | Select a dropdown option | | webcli press <key> | Press a keyboard key (Enter, Tab, Escape...) |

Waiting

| Command | Description | |---------|-------------| | webcli wait <selector> | Wait for CSS selector to become visible | | webcli waitfor <text> | Wait for text to appear on page | | webcli sleep <ms> | Sleep for specified milliseconds |

Cookies & Browser

| Command | Description | |---------|-------------| | webcli cookie export | Export cookies as JSON | | webcli cookie import <file> | Import cookies from JSON file | | webcli viewport <width> <height> | Change viewport size | | webcli useragent <string> | Change user agent | | webcli network [on\|off] | Toggle request/response logging | | webcli screenshot | Take a full-page screenshot |

Tab & Daemon Management

| Command | Description | |---------|-------------| | webcli tabs | List all open tabs | | webcli quit | Close a tab | | webcli status | Show daemon status (PID, uptime, tabs) | | webcli stop | Stop the daemon and close browser |

Global Options

| Option | Description | |--------|-------------| | -t, --tab <name> | Target tab (default: "default") | | --json | Output as JSON | | --timeout <ms> | Command timeout (default: 30000) | | --verbose | Enable debug logging |

Configuration

Create ~/.webcli/config.json:

{
  "headless": true,
  "browser": "chromium",
  "userDataDir": "~/.webcli/browser-data",
  "viewport": { "width": 1280, "height": 800 },
  "locale": "en-US",
  "timezoneId": "America/New_York",
  "waitAfterClick": 500,
  "waitAfterPress": 300,
  "idleTimeout": 300000,
  "defaultTimeout": 30000
}

Set "headless": false to use headed mode (required for sites with aggressive bot detection like X/Twitter).

Architecture

CLI Client (webcli)
    │
    │── Unix Socket (~/.webcli/daemon.sock)
    │
    ▼
Daemon (background process)
    │
    ├── Playwright Browser (Chromium/Firefox/WebKit)
    │   ├── Tab: "default" → Page
    │   ├── Tab: "search"  → Page
    │   └── Tab: "login"   → Page
    │
    ├── Tab Manager (named page instances)
    ├── Handler Registry (action dispatch)
    └── Auto-shutdown after 5min idle

The daemon starts automatically on the first command and persists in the background. All commands communicate via a Unix domain socket using newline-delimited JSON.

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT