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

xfetch-cli

v0.2.1

Published

Fast X/Twitter CLI scraper. No API keys. Just cookies and go.

Readme

xfetch 🚀

Fast X/Twitter CLI scraper. No API keys. Just cookies and go.

npm version License: MIT

Features

  • 🔐 Cookie-based auth - Extract from Chrome, Firefox, Safari, Arc, Brave
  • 🔄 Auto-refresh query IDs - Survives X frontend deployments
  • 📊 Multi-format output - JSON, JSONL, CSV, SQLite
  • Session pooling - High-volume scraping with rate limit awareness
  • 🛡️ Anti-detection - Transaction IDs, request jitter, feature flags
  • 🔁 Resumable pagination - Pick up where you left off
  • 🌐 Proxy support - Rotation for residential IPs

Install

# npm
npm install -g @lxgic/xfetch

# pnpm
pnpm add -g @lxgic/xfetch

# bun (recommended)
bun add -g @lxgic/xfetch

# One-shot (no install)
bunx @lxgic/xfetch tweets @elonmusk
npx @lxgic/xfetch tweets @elonmusk

Quick Start

# Check auth status
xfetch auth check

# Get user profile
xfetch user @elonmusk

# Fetch tweets
xfetch tweets @elonmusk -n 50

# Search
xfetch search "AI agents" -n 100

# Export to CSV
xfetch tweets @elonmusk -n 100 --format csv > tweets.csv

# Export to SQLite
xfetch tweets @elonmusk --all --format sqlite --db tweets.db

Commands

Authentication

xfetch auth check                        # Show active auth
xfetch auth extract --browser chrome     # Extract cookies

Users

xfetch user @handle                      # Profile by handle
xfetch user 12345678                     # Profile by ID
xfetch followers @handle -n 100          # Followers list
xfetch following @handle -n 100          # Following list

Tweets

xfetch tweets @handle -n 50              # User timeline
xfetch tweet <url-or-id>                 # Single tweet
xfetch thread <url-or-id>                # Full thread
xfetch replies <url-or-id>               # Replies to tweet

Search

xfetch search "query" -n 100             # Basic search
xfetch search "from:handle since:2024-01-01"  # Advanced
xfetch search "query" --type latest      # Latest tweets

Timelines

xfetch home                              # Home timeline
xfetch home --following                  # Chronological
xfetch bookmarks -n 50                   # Your bookmarks
xfetch likes @handle -n 50               # User's likes

Lists

xfetch lists @handle                     # User's lists
xfetch list <id> -n 100                  # List timeline

Output Formats

--format json     # Default, pretty printed
--format jsonl    # Line-delimited JSON (streaming)
--format csv      # CSV with headers
--format sqlite   # SQLite database (use with --db)

Pagination

xfetch tweets @handle --all              # All pages
xfetch tweets @handle --max-pages 10     # Limit pages
xfetch tweets @handle --cursor <cursor>  # Resume
xfetch tweets @handle --delay 1000       # Delay (ms)

# Resume support
xfetch tweets @handle --all --resume state.json

Configuration

Config file: ~/.config/xfetch/config.json

{
  "cookieSource": "chrome",
  "chromeProfile": "Default",
  "defaultFormat": "json",
  "timeoutMs": 30000,
  "delayMs": 500
}

Advanced

Session Pool

For high-volume scraping with multiple accounts:

xfetch config sessions add session1.json
xfetch config sessions add session2.json
xfetch search "query" --pool

Proxy

xfetch tweets @handle --proxy http://user:pass@host:port
xfetch tweets @handle --proxy-file proxies.txt

Query ID Management

xfetch query-ids --refresh    # Fetch latest
xfetch query-ids --list       # Show cached

Why xfetch?

| Feature | xfetch | bird | snscrape | |---------|--------|------|----------| | Query ID auto-refresh | ✅ | ❌ | ❌ | | Multi-format output | ✅ | ❌ | ✅ | | Session pooling | ✅ | ❌ | ❌ | | Proxy rotation | ✅ | ❌ | ❌ | | Resume pagination | ✅ | Cursor | ❌ | | Anti-detection | ✅ | ❌ | ❌ | | Active maintenance | ✅ | ✅ | ⚠️ |

License

MIT © LXGIC Studios

Credits

  • Research from nitter, bird, snscrape, twint, twikit, rettiwt-api
  • Original bird CLI by @steipete