The best way to explore Twitter exports. Uses embeddings, hierarchical clustering and labeling, tweet feeds, & more.
10
stars
797
commits
JavaScript
primary language
Mar 17, 2026
updated
Turn a Twitter/X archive into a searchable map of themes, threads, and quotes.
Tweetscope imports an archive, enriches tweets with surrounding context, projects the corpus into an interactive space, names clusters with hierarchical labels, and serves the result through a React UI backed by a Hono API and LanceDB.
-likes dataset that is grouped with the main collection on the dashboard.
The frontend is a routed React/Vite app with three live screens: dashboard, new collection, and the main explore surface. It talks only to the TypeScript Hono API. The API reads catalog metadata and serving tables from LanceDB, proxies a small set of raw files, and spawns Python subprocesses for imports. The Python side materializes artifacts under LATENT_SCOPE_DATA, exports serving tables to LanceDB, and keeps the catalog in sync.
Diagram source: documentation/diagrams/system-architecture.mmd
The current default Twitter pipeline is no longer the old ingest -> embed -> UMAP -> cluster -> label -> explore path. Today it is:
twitter_import.pyembed.pybuild_hierarchy.py (PLSCAN)toponymy_labels.pyDiagram source: documentation/diagrams/pipeline-flow.mmd
uvVOYAGE_API_KEYOPENAI_API_KEYLATENT_SCOPE_DATA directoryNote: the repo root does not currently include a checked-in Python packaging manifest, so the commands below assume the Python dependencies are already available in your active environment.
git clone --recurse-submodules https://github.com/maskys/tweetscope.git
cd latent-scope
cd api && npm install && cd ..
cd web && npm install && cd ..
cp .env.example .env
Set at least:
LATENT_SCOPE_DATA=~/latent-scope-data
LATENT_SCOPE_APP_MODE=studio
VOYAGE_API_KEY=your-key
OPENAI_API_KEY=your-key
PORT=3000
The API dev server reads the repo-root .env via api/package.json.
# Terminal 1
cd api && npm run dev
# Terminal 2
cd web && npm run dev
Open http://localhost:5174.
How to request your X data export
- Go to x.com/settings/download_your_data
- Re-enter your password and request your archive
- X will email you when it's ready (usually 24–48 hours)
- Download the
.zip— this is what you upload to Tweetscope
Preferred UI flow:
/newlatentscope.scripts.twitter_import and redirects into the new scope when the job completesCommunity Archive is an alternative if you don't have your own export. It pulls publicly donated tweet archives by username. Enter any username that has donated their archive and Tweetscope will fetch and process it. Community archives may not include likes.
Direct CLI flow:
uv run python3 -m latentscope.scripts.twitter_import my-tweets \
--source zip \
--zip_path archives/twitter-archive.zip \
--run_pipeline
For large archives, run year-by-year ingest first and then a final --run_pipeline pass. See the development guide for the current storage layout and pipeline details.
See DEVELOPMENT.md for:
LATENT_SCOPE_DATADeployment notes live under documentation/, including Vercel deployment and Cloudflare R2 / CDN setup.
JavaScript
38.7%
Python
33.8%
TypeScript
11.0%
SCSS
8.9%
Shell
4.9%
CSS
2.4%
The best way to explore Twitter exports. Uses embeddings, hierarchical clustering and labeling, tweet feeds, & more.
10
stars
797
commits
JavaScript
primary language
Mar 17, 2026
updated
Turn a Twitter/X archive into a searchable map of themes, threads, and quotes.
Tweetscope imports an archive, enriches tweets with surrounding context, projects the corpus into an interactive space, names clusters with hierarchical labels, and serves the result through a React UI backed by a Hono API and LanceDB.
-likes dataset that is grouped with the main collection on the dashboard.
The frontend is a routed React/Vite app with three live screens: dashboard, new collection, and the main explore surface. It talks only to the TypeScript Hono API. The API reads catalog metadata and serving tables from LanceDB, proxies a small set of raw files, and spawns Python subprocesses for imports. The Python side materializes artifacts under LATENT_SCOPE_DATA, exports serving tables to LanceDB, and keeps the catalog in sync.
Diagram source: documentation/diagrams/system-architecture.mmd
The current default Twitter pipeline is no longer the old ingest -> embed -> UMAP -> cluster -> label -> explore path. Today it is:
twitter_import.pyembed.pybuild_hierarchy.py (PLSCAN)toponymy_labels.pyDiagram source: documentation/diagrams/pipeline-flow.mmd
uvVOYAGE_API_KEYOPENAI_API_KEYLATENT_SCOPE_DATA directoryNote: the repo root does not currently include a checked-in Python packaging manifest, so the commands below assume the Python dependencies are already available in your active environment.
git clone --recurse-submodules https://github.com/maskys/tweetscope.git
cd latent-scope
cd api && npm install && cd ..
cd web && npm install && cd ..
cp .env.example .env
Set at least:
LATENT_SCOPE_DATA=~/latent-scope-data
LATENT_SCOPE_APP_MODE=studio
VOYAGE_API_KEY=your-key
OPENAI_API_KEY=your-key
PORT=3000
The API dev server reads the repo-root .env via api/package.json.
# Terminal 1
cd api && npm run dev
# Terminal 2
cd web && npm run dev
Open http://localhost:5174.
How to request your X data export
- Go to x.com/settings/download_your_data
- Re-enter your password and request your archive
- X will email you when it's ready (usually 24–48 hours)
- Download the
.zip— this is what you upload to Tweetscope
Preferred UI flow:
/newlatentscope.scripts.twitter_import and redirects into the new scope when the job completesCommunity Archive is an alternative if you don't have your own export. It pulls publicly donated tweet archives by username. Enter any username that has donated their archive and Tweetscope will fetch and process it. Community archives may not include likes.
Direct CLI flow:
uv run python3 -m latentscope.scripts.twitter_import my-tweets \
--source zip \
--zip_path archives/twitter-archive.zip \
--run_pipeline
For large archives, run year-by-year ingest first and then a final --run_pipeline pass. See the development guide for the current storage layout and pipeline details.
See DEVELOPMENT.md for:
LATENT_SCOPE_DATADeployment notes live under documentation/, including Vercel deployment and Cloudflare R2 / CDN setup.
JavaScript
38.7%
Python
33.8%
TypeScript
11.0%
SCSS
8.9%
Shell
4.9%
CSS
2.4%