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.
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
DESIGN.md— architecture, configuration, data layoutCONTRIBUTING.md— dev setup, releases (tag-driven, PyPI trusted publishing)CHANGELOG.md— release historySECURITY.md— reporting vulnerabilities
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49396a74f4808a43a820799307fdc169669ebc5d84b1163f4c5773c74e8ee283
|
|
| MD5 |
b600686a1bd8e200fb1dd115b5e55916
|
|
| BLAKE2b-256 |
6096c244397631cbb5d95b6831b13e54e1a20e27dd1e18c6595155930d6958e9
|
Provenance
The following attestation bundles were made for redlens-0.3.0.tar.gz:
Publisher:
release.yml on TheWeiHu/redlens
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
redlens-0.3.0.tar.gz -
Subject digest:
49396a74f4808a43a820799307fdc169669ebc5d84b1163f4c5773c74e8ee283 - Sigstore transparency entry: 1956159825
- Sigstore integration time:
-
Permalink:
TheWeiHu/redlens@174dfff8b877f0ac581bfd80087c56a09f28e6fb -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/TheWeiHu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@174dfff8b877f0ac581bfd80087c56a09f28e6fb -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
183a95a06a98bc1c7a298c2e671ef9a67f558827fbd2c2089735c00e9de316b1
|
|
| MD5 |
3ea7d9f7252e1d88e09242d329d249f0
|
|
| BLAKE2b-256 |
07b0c141014cbbc8bc89c3f48155d1a0681e8ba6124bc1b15cd36572e438da5c
|
Provenance
The following attestation bundles were made for redlens-0.3.0-py3-none-any.whl:
Publisher:
release.yml on TheWeiHu/redlens
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
redlens-0.3.0-py3-none-any.whl -
Subject digest:
183a95a06a98bc1c7a298c2e671ef9a67f558827fbd2c2089735c00e9de316b1 - Sigstore transparency entry: 1956160071
- Sigstore integration time:
-
Permalink:
TheWeiHu/redlens@174dfff8b877f0ac581bfd80087c56a09f28e6fb -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/TheWeiHu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@174dfff8b877f0ac581bfd80087c56a09f28e6fb -
Trigger Event:
push
-
Statement type: