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

redditlens

v0.1.0

Published

Find real pain points on Reddit and draft value-first replies. CLI + Claude Code skill. Serper + Reddit .json, zero scraping tricks, MIT.

Downloads

21

Readme

A tiny CLI + Claude Code skill that turns Reddit into a market research engine. Ask five questions, get a pain-points report with draft replies you can post.

Built for founders, indie hackers, and marketers who want to find real customers instead of shouting into the void.

What it does

  1. You answer five questions about your product, audience, and tone.
  2. redditlens searches Reddit via Google (Serper API) for pain language — not brand names.
  3. It enriches every match via Reddit's public .json endpoint to pull scores and top comments.
  4. Your agent clusters the pain points and drafts replies that lead with empathy and value.

No scraping tricks. No Reddit API keys. No database. One dependency (undici). MIT licensed.

Install

npm install -g redditlens

Or run without installing:

npx redditlens search "notion alternatives" --period month --comments

Requirements

  • Node.js 18+
  • A Serper API key (free, see below)

Get a free Serper API key

Serper is a thin wrapper over Google search. The free plan gives you 2500 queries with no credit card. More than enough to run redditlens for weeks.

  1. Go to serper.dev
  2. Sign up with Google or email
  3. Copy your API key from the dashboard
  4. Export it:
export SERPER_API_KEY=your_key_here

Add it to your shell profile (~/.zshrc, ~/.bashrc) to persist it.

Usage

CLI

# Search for pain points in a niche
redditlens search "prompt engineering" --period month --limit 15 --comments

# Restrict to specific subreddits
redditlens search "notion alternatives" --subreddits productivity,ObsidianMD,PKMS --comments

# Fetch a single post deeply
redditlens post https://reddit.com/r/SaaS/comments/abc123/title/ --comments

# Discover relevant subreddits for a niche
redditlens subreddits "indie hacking"

All output is JSON on stdout. Pipe it to jq, into a file, or into another tool.

As a Claude Code skill

Copy SKILL.md from this repo into ~/.claude/skills/redditlens/ and restart Claude Code. Then invoke:

/redditlens

Claude will ask you five questions, run the searches, cluster the pain points, and draft replies. No prompt engineering required on your side.

Without proxies (polite mode)

By default, redditlens respects Reddit's public .json rate limit. It throttles to 1 request/second with exponential backoff on 429 responses (2s, 4s, 8s, then fail).

This is fine for the target use case — one-shot market research. A typical pain-points search hits 15-30 posts, so expect 30-60 seconds per run.

Do: run redditlens when you actually want to do research. Don't: fire off a dozen parallel searches or put it in a tight loop.

With proxies (high volume)

If you need speed or high volume, provide a proxy list and redditlens will rotate per request (no throttle).

Create a proxies.txt file with one proxy per line:

1.2.3.4:8080:username:password
5.6.7.8:8080:username:password
9.10.11.12:8080

Both authenticated (ip:port:user:pass) and unauthenticated (ip:port) formats are supported.

Then:

export PROXIES_FILE=./proxies.txt
redditlens search "pain language" --limit 50 --comments

Any HTTP/HTTPS proxy provider works (residential recommended for Reddit — datacenter IPs get blocked fast).

Use cases

1. Validating a product idea

You think founders hate their current invoicing tool. Before you build anything:

redditlens search "hate invoicing" --subreddits SaaS,Entrepreneur,indiehackers --period month --comments
redditlens search "invoicing alternatives" --period month --comments

Read the clusters. If three different pain points keep surfacing, you have a signal. If it's just one loud complainer, you don't.

2. Finding customers (the respectful way)

You already built the tool. You want to find threads where you can genuinely help:

/redditlens
> What are you researching? My product, a lightweight invoicing tool for freelancers
> Who is your target user? Solo freelancers and contractors
> Subreddits? discover
> Time window? week
> Reply tone? casual, helpful

Claude will give you 3-5 threads with draft replies. Review them, post the ones that fit, skip the ones that don't.

3. Agent research loop

Let an agent run redditlens as part of a larger research pipeline:

SERPER_API_KEY=xxx redditlens search "<topic>" --comments | jq '.posts[] | {title, url, score}'

JSON output means any agent or script can parse it. Claude, GPT, OpenAI Responses, whatever.

How it works

User question
    │
    ▼
SKILL.md asks 5 questions
    │
    ▼
redditlens search "<pain phrase>"
    │
    ▼
Serper (Google) → Reddit post URLs
    │
    ▼
Reddit .json endpoint → score, comments, body
    │              (throttled or proxy-rotated)
    ▼
JSON to stdout
    │
    ▼
Agent clusters pain points, drafts replies

The key insight: Reddit's .json endpoint is public and free. No API key, no OAuth. You just need Google search to find the right threads, and you need to not hammer the endpoint.

CLI reference

redditlens search "<query>" [options]
redditlens post <reddit-url> [--comments]
redditlens subreddits "<niche>"

Search options

| Flag | Description | Default | |------------------|--------------------------------------------------|----------| | --subreddits | Comma-separated subreddit list | (all) | | --period | Time window: day, week, month, year | week | | --limit | Max results | 20 | | --comments | Include top comments | off |

Environment

| Variable | Required | Description | |-------------------|----------|----------------------------------------------------| | SERPER_API_KEY | Yes | Free at serper.dev | | PROXIES_FILE | No | Path to proxy list for high-volume mode | | REDDITLENS_DEBUG| No | Print proxy mode info on startup |

FAQ

Does this violate Reddit's ToS? redditlens uses Reddit's public .json endpoint, which is the same data Reddit serves to logged-out web visitors. Respect the rate limit (the CLI enforces it by default) and you're fine. Don't scrape at scale without proper authentication.

Why Serper and not the Reddit search API? Reddit's native search is mediocre and rate-limited. Google finds Reddit threads better than Reddit does. Serper is the cheapest Google search API.

Why not use an LLM to find pain points directly? redditlens does use an LLM — the Claude Code skill clusters pain points and drafts replies. But the LLM operates on real Reddit data, not vibes. Grounding matters.

Can I use this with a different agent / framework? Yes. The CLI outputs JSON. Pipe it wherever. The skill is for Claude Code, but the CLI is standalone.

What about LinkedIn / Twitter / HN? Out of scope for redditlens. If you want multi-platform monitoring, that's a different tool. redditlens is deliberately narrow.

Contributing

PRs welcome. Keep it tiny — the whole point is that this stays a single-purpose tool you can read in one sitting.

License

MIT. Do whatever you want with it.