Skip to main content

Archive any Reddit user's public history into a local SQLite database you own, and analyze it

Project description

redlens

A local lens on public Reddit history — archive users and topics, analyze them, own the data.

CI MIT license Python 3.11+ Data: arctic-shift

How It Works · Install · Commands · Design

Archive and analyze public Reddit history, locally. redlens pulls from arctic-shift — a free, keyless mirror — and keeps everything in one SQLite file you own. No API keys, no setup, no Reddit account.

How It Works

Archive    redlens sync <user>     a user's full public post + comment history
           redlens track <topic>   build a subreddit net, archive every match
Analyze    redlens show / topics   rollups, scores, per-subreddit totals
Render     redlens page <topic>    a standalone, dependency-free HTML report

arctic has no global text search, so a topic isn't a query — it's a net. track discovers the subreddits a topic lives in, archives every matching post across them, and remembers the net so re-runs pull only what's new. The schema is created and migrated automatically on first use. Full architecture and configuration in DESIGN.md.

Install

pip install -e ".[dev]"

Two runtime dependencies (platformdirs, sqlmodel), all permissively licensed (MIT/BSD/PSF).

Commands

Command What it does
redlens sync <user> Archive a user's public post + comment history
redlens show <user> Print a rollup (--json for machine output)
redlens list Every archived user — counts, last activity
redlens export <user> Dump posts + comments (--format json|csv|jsonl, -o PATH)
redlens track <topic> Build a subreddit net and archive every matching post
redlens topics Every tracked topic — keywords, net size, match count
redlens page <topic> Render a standalone HTML report (--all for every topic + index)
redlens explore Browse the DB in your browser (read-only, with a SQL console)
redlens summarize <user> LLM-powered summary (needs an API key — see below)
redlens setup Configure the optional LLM API key
redlens completions <shell> Print a bash|zsh|fish completion script

Run redlens <command> --help for flags. track takes --query/--exclude keyword steering, --sources to pick the discovery net (name, global, web, popular, llm), --comments to archive threads, and --discover to widen the net through matched authors.

Optional LLM Key

An optional OpenAI-compatible API key powers redlens summarize, LLM-scored sentiment in page --summary, and the llm discovery source. The first interactive run offers to collect it, or run redlens setup anytime. It's stored mode-600 in your per-user config dir — details in DESIGN.md.

No Reddit official-API integration. As of late 2025 Reddit gates its API behind pre-approval and no longer hands out keys on request, so redlens relies on the keyless arctic-shift mirror. Hold Reddit credentials and want fresh sync? Open an issue and we'll build the provider around your key.

More

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redlens-0.3.0.tar.gz (124.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

redlens-0.3.0-py3-none-any.whl (106.9 kB view details)

Uploaded Python 3

File details

Details for the file redlens-0.3.0.tar.gz.

File metadata

  • Download URL: redlens-0.3.0.tar.gz
  • Upload date:
  • Size: 124.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for redlens-0.3.0.tar.gz
Algorithm Hash digest
SHA256 49396a74f4808a43a820799307fdc169669ebc5d84b1163f4c5773c74e8ee283
MD5 b600686a1bd8e200fb1dd115b5e55916
BLAKE2b-256 6096c244397631cbb5d95b6831b13e54e1a20e27dd1e18c6595155930d6958e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for redlens-0.3.0.tar.gz:

Publisher: release.yml on TheWeiHu/redlens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file redlens-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: redlens-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 106.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for redlens-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 183a95a06a98bc1c7a298c2e671ef9a67f558827fbd2c2089735c00e9de316b1
MD5 3ea7d9f7252e1d88e09242d329d249f0
BLAKE2b-256 07b0c141014cbbc8bc89c3f48155d1a0681e8ba6124bc1b15cd36572e438da5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for redlens-0.3.0-py3-none-any.whl:

Publisher: release.yml on TheWeiHu/redlens

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page