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

@cli4ai/chrome

v1.1.4

Published

Chrome browser automation with managed browser instance

Downloads

1,372

Readme

@cli4ai/chrome

Official @cli4ai package • https://cli4ai.com • Install cli4ai: npm i -g cli4ai

Chrome browser automation via Puppeteer. Launches a managed browser instance with persistent profile - no need to quit your existing browser or enable remote debugging.

Setup

npm i -g cli4ai
cli4ai add -g chrome

Usage

# Navigate to a URL (auto-launches browser if not running)
cli4ai run chrome navigate https://example.com

# Run in headless mode (no visible window)
cli4ai run chrome --headless navigate https://example.com

# Screenshot
cli4ai run chrome screenshot output.png --full-page

# Get page text
cli4ai run chrome text

Commands

Browser Management

cli4ai run chrome launch              # Explicitly launch browser
cli4ai run chrome --headless launch   # Launch in headless mode
cli4ai run chrome close               # Close managed browser
cli4ai run chrome status              # Check if browser is running
cli4ai run chrome tabs                # List open tabs

Navigation

cli4ai run chrome navigate <url>              # Open URL
cli4ai run chrome navigate <url> --new-tab    # Open in new tab
cli4ai run chrome navigate <url> --wait load  # Wait for: load, domcontentloaded, networkidle0, networkidle2

Interaction

cli4ai run chrome click <selector>                    # Click element
cli4ai run chrome type <selector> "text"              # Type into input
cli4ai run chrome type <selector> "text" --clear      # Clear first, then type
cli4ai run chrome wait <selector>                     # Wait for element
cli4ai run chrome wait <selector> --timeout 5000      # With timeout (ms)

Content Extraction

cli4ai run chrome html                    # Get full page HTML
cli4ai run chrome html <selector>         # Get element HTML
cli4ai run chrome text                    # Get page text content
cli4ai run chrome text <selector>         # Get element text
cli4ai run chrome cookies                 # Get all cookies
cli4ai run chrome cookies example.com     # Filter by domain
cli4ai run chrome eval "document.title"   # Run JavaScript

Screenshots & PDF

cli4ai run chrome screenshot                      # Save screenshot.png
cli4ai run chrome screenshot output.png           # Custom filename
cli4ai run chrome screenshot --full-page          # Full page capture
cli4ai run chrome screenshot --selector "#hero"   # Element screenshot
cli4ai run chrome pdf                             # Save page.pdf (headless)
cli4ai run chrome pdf output.pdf                  # Custom filename

Headless Mode

Add --headless before any command to run without a visible browser window:

cli4ai run chrome --headless navigate https://example.com
cli4ai run chrome --headless screenshot
cli4ai run chrome --headless text

Headless mode is useful for:

  • Automated scraping
  • CI/CD pipelines
  • Background tasks

Profile Persistence

Browser data (cookies, localStorage, logins) persists in ~/.cli4ai/chrome/profile/. This means:

  • You stay logged into websites between sessions
  • Browser extensions are preserved
  • History and settings persist

Related

Other browser-dependent tools like @cli4ai/twitter and @cli4ai/linkedin can use the managed browser.