doppelgangers
v0.0.2
Published
Find duplicate PRs through embedding visualization
Maintainers
Readme
Doppelgangers
Find duplicate issues and PRs through embedding visualization. Fetches issues/PRs from a GitHub repo, generates embeddings, and renders an interactive 2D/3D scatter plot where similar items cluster together.
Demos: openai/codex | sst/opencode | openclaw/openclaw
Install
npm install -g doppelgangersUsage
export OPENAI_API_KEY=...
doppelgangers --repo facebook/reactThis will:
- Fetch all open issues and PRs from the repo
- Generate embeddings using OpenAI
- Project to 2D/3D using UMAP
- Output
triage.htmlwith an interactive viewer
Options
| Option | Description | Default |
|--------|-------------|---------|
| --repo <url\|owner/repo> | GitHub repository (required) | |
| --state <state> | open, closed, or all | open |
| --type <type> | pr, issue, or all | all |
| --output <path> | Items JSON path | prs.json |
| --embeddings <path> | Embeddings path | embeddings.jsonl |
| --html <path> | HTML viewer path | triage.html |
| --model <model> | OpenAI embedding model | text-embedding-3-small |
| --batch <n> | Batch size for embeddings | 100 |
| --max-chars <n> | Max chars for embedding input | 4000 |
| --body-chars <n> | Max chars for body snippet | 2000 |
| --neighbors <n> | UMAP neighbors | 15 |
| --min-dist <n> | UMAP min distance | 0.1 |
| --search | Include embeddings for semantic search | false |
Viewer
Controls:
- 2D: Drag to pan, scroll to zoom
- 3D: Drag to rotate, Ctrl/Cmd+drag to pan, scroll to zoom
- Select: Shift+drag (Ctrl/Cmd+Shift to add to selection)
- Deselect: Click empty space
Sidebar:
- "Open All" opens selected items in new tabs (allow popups)
- "Copy" copies selection as formatted list
Visual Encoding:
- Filled circles = PRs, Hollow rings = Issues
- Green = Open, Purple = Closed, Orange = Selected
Filters: Toggle PRs/Issues and Open/Closed visibility
Requirements
- Node.js 20+
ghCLI (authenticated)OPENAI_API_KEYenvironment variable
License
MIT
