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

reddit-fetch-cli

v1.0.0

Published

Reddit data extraction CLI - Fetch posts, comments, users, and subreddit data. No API keys required. Export to JSON/CSV.

Readme

reddit-fetch

Reddit data extraction CLI. Fetch posts, comments, users, and subreddit data.

Installation

npm install -g reddit-fetch-cli

Usage

# Get subreddit posts
reddit-fetch posts programming --limit 50

# User profile
reddit-fetch user spez

# Post with comments
reddit-fetch thread 1abc2de

# Search
reddit-fetch search "typescript tips" --subreddit programming

Commands

posts <subreddit>

Fetch posts from a subreddit.

reddit-fetch posts programming
reddit-fetch posts javascript --limit 100
reddit-fetch posts wallstreetbets --sort top --time week
reddit-fetch posts all --sort hot

Options:

  • --limit <n> - Number of posts (default: 25)
  • --sort <type> - Sort: hot, new, top, rising, controversial
  • --time <period> - Time filter for top/controversial: hour, day, week, month, year, all
  • --after <id> - Pagination cursor

user <username>

Get user profile and posts.

reddit-fetch user spez
reddit-fetch user gallowboob --posts --limit 50
reddit-fetch user username --comments

Options:

  • --posts - Include user's posts
  • --comments - Include user's comments
  • --limit <n> - Number of items

thread <id>

Get a post with all comments.

reddit-fetch thread 1abc2de
reddit-fetch thread 1abc2de --depth 3
reddit-fetch thread 1abc2de --sort best

Options:

  • --depth <n> - Comment tree depth (default: all)
  • --sort <type> - Sort: best, top, new, controversial, old

subreddit <name>

Get subreddit info.

reddit-fetch subreddit programming
reddit-fetch subreddit pics --rules

search <query>

Search posts.

reddit-fetch search "best programming language"
reddit-fetch search "crypto" --subreddit cryptocurrency
reddit-fetch search "news" --sort relevance --time month

Options:

  • --subreddit <name> - Limit to specific subreddit
  • --sort <type> - Sort: relevance, hot, top, new, comments
  • --time <period> - Time filter
  • --limit <n> - Number of results

Output Formats

# JSON (default)
reddit-fetch posts programming

# Table view
reddit-fetch posts programming -o table

# CSV
reddit-fetch posts programming -o csv > posts.csv

# Save to file
reddit-fetch user spez --save user.json

Example Output

{
  "posts": [
    {
      "id": "1abc2de",
      "title": "Why I love TypeScript",
      "author": "devuser",
      "subreddit": "programming",
      "score": 1523,
      "upvoteRatio": 0.94,
      "numComments": 234,
      "created": "2024-01-15T10:30:00Z",
      "url": "https://reddit.com/r/programming/comments/1abc2de",
      "selftext": "Here's my experience with...",
      "flair": "Discussion"
    }
  ],
  "after": "t3_1xyz789"
}

Batch Processing

# Multiple subreddits
for sub in programming javascript typescript; do
  reddit-fetch posts $sub --limit 100 > ${sub}.json
done

# Continuous monitoring
watch -n 60 "reddit-fetch posts wallstreetbets --sort new --limit 10"

Rate Limiting

reddit-fetch includes built-in rate limiting to respect Reddit's guidelines. For heavy usage, add delays:

reddit-fetch posts programming --delay 2000  # 2 second delay between requests

Why reddit-fetch?

  • No API credentials - Works without Reddit app registration
  • Fast - Efficient data extraction
  • Comprehensive - Posts, comments, users, subreddits
  • Multiple formats - JSON, CSV, table output
  • Pagination - Handle large datasets with --after

Built by LXGIC Studios

🔗 GitHub · Twitter