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/twitter

v1.0.17

Published

Twitter/X browser automation

Readme

@cli4ai/twitter

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

X/Twitter automation via Puppeteer. Requires Chrome running with remote debugging.

Setup

npm i -g cli4ai
cli4ai add -g chrome twitter
  1. Start Chrome with remote debugging (see @cli4ai/chrome), then:
cli4ai run chrome connect
  1. Make sure you’re logged into X/Twitter in that Chrome session.

Commands

Core

cli4ai run twitter timeline [count]           # Home timeline
cli4ai run twitter notifications [count]      # Your notifications
cli4ai run twitter search "<query>" [count]   # Search tweets
cli4ai run twitter post "<message>"           # Post a tweet
cli4ai run twitter reply <url> "<message>"    # Reply to a tweet
cli4ai run twitter profile <handle>           # Get user profile
cli4ai run twitter digest [handles...]        # Last 24h tweets

Trend Analysis

cli4ai run twitter trends [location]          # Current trending topics
cli4ai run twitter analytics <handle> [n]     # Engagement stats for user's tweets
cli4ai run twitter tweet <url>                # Detailed stats for single tweet
cli4ai run twitter mentions "<query>" [n]     # Track mentions/topic with engagement

Network Analysis

cli4ai run twitter followers <handle> [n]     # List followers with their stats
cli4ai run twitter following <handle> [n]     # List who they follow
cli4ai run twitter engagers <handle> [n]      # Top accounts engaging with user

Advanced

cli4ai run twitter compare <h1> <h2>          # Side-by-side account comparison
cli4ai run twitter likes <handle> [n]         # What they've liked recently
cli4ai run twitter bookmarks [n]              # Your saved tweets
cli4ai run twitter lists <handle>             # User's lists

Examples

# What's trending right now?
cli4ai run twitter trends

# Get engagement analytics for a user
cli4ai run twitter analytics steipete 20
# Returns: avg likes/retweets/views, engagement rate, top tweets

# Deep dive on a specific tweet
cli4ai run twitter tweet "https://x.com/elonmusk/status/123456789"
# Returns: full engagement (replies, retweets, likes, bookmarks, views), engagement rate

# Track mentions of a topic or user
cli4ai run twitter mentions "claude AI" 20
cli4ai run twitter mentions "@anthropic" 10
# Returns: tweets with engagement stats, total/avg engagement

# Daily digest from specific accounts
cli4ai run twitter digest steipete badlogicgames

# Network analysis
cli4ai run twitter followers steipete 20        # Who follows them
cli4ai run twitter following elonmusk 10        # Who they follow
cli4ai run twitter engagers steipete            # Top accounts engaging (visits likes/RTs pages)

# Advanced
cli4ai run twitter compare steipete badlogicgames  # Side-by-side comparison
cli4ai run twitter likes steipete 10            # What they've liked
cli4ai run twitter bookmarks 20                 # Your saved tweets
cli4ai run twitter lists someuser               # User's public lists

Output

All commands output JSON for easy piping:

# Get top trending topic
cli4ai run twitter trends | jq '.[0]'

# Get engagement rate for a user
cli4ai run twitter analytics steipete 10 | jq '.engagementRate'

# Get views on a tweet
cli4ai run twitter tweet "https://x.com/user/status/123" | jq '.engagement.views'