MCPcopy Index your code
hub / github.com/Xueyang-Song/paper-pilot

github.com/Xueyang-Song/paper-pilot @1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0 ↗ · + Follow
600 symbols 1,629 edges 84 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Stars TypeScript Electron React License

Navigate the sea of academic papers — with AI as your co-pilot.

FeaturesQuick StartSourcesArchitectureContributing


What is Paper Pilot?

Paper Pilot is a local-first desktop research assistant built for scientists who are tired of switching between 10 browser tabs to find, read, and synthesize academic papers.

Everything runs on your machine — your papers, your notes, your AI conversations. No cloud lock-in, no subscription fees, no data leaving your computer.

You ──▶  Ask a research question
          │
          ▼
     Paper Pilot crawls 8+ academic sources simultaneously
          │
          ▼
     Papers downloaded → converted → indexed (FTS5 + vector search)
          │
          ▼
     AI synthesizes insights from your local corpus
          │
          ▼
You ──▶  Get answers grounded in real papers, not hallucinations

✨ Features

### 🔍 Multi-Source Paper Crawling Simultaneously queries **8+ academic databases**: - OpenAlex, Crossref, Semantic Scholar - PubMed/PMC, arXiv, Europe PMC - CORE, Unpaywall - Google Scholar (experimental) ### 🤖 AI-Assisted Synthesis - **Local Ollama** for fully offline operation - **OpenAI-compatible** API support - Vercel AI Gateway support with non-generating provider health checks - Tool-calling agent with citation grounding - Chat workspace with full conversation history
### 🗄️ Smart Local Storage - **SQLite** with `node:sqlite` (zero dependencies) - **FTS5** full-text search across all papers - **`sqlite-vec`** vector similarity search - Project-scoped storage — keep research contexts separate ### 📄 PDF → Knowledge Pipeline - Open-access PDF auto-fetching via Unpaywall - **MarkItDown** conversion for AI-ready text - Python virtualenv isolation for scripting tools - Secure credential storage via Electron `safeStorage`

🚀 Quick Start

Requirements: - Node.js >= 22.18.0 - Python 3.11+ - (Optional) Ollama for local AI

# Clone and install
git clone https://github.com/Xueyang-Song/paper-pilot.git
cd paper-pilot
npm install

# Run in development
npm run dev

# Build for production
npm run build

# Package as desktop app
npm run package

Note: Dev server must use http://127.0.0.1:5173. If that port is busy, free it before running.


📚 Paper Sources

Source Type API Key Required
OpenAlex Multidisciplinary Optional (email)
Crossref Multidisciplinary Optional (email)
Semantic Scholar CS + Science Recommended
PubMed / PMC Biomedical No
arXiv Physics/CS/Math No
Europe PMC Life Sciences No
CORE Open Access Required
Unpaywall Open Access PDFs Optional (email)
Google Scholar All fields No (experimental ⚠️)

🏗 Architecture

paper-pilot/
├── src/
│   ├── electron/          # Main process (Node.js)
│   │   ├── crawlers/      # Academic source adapters
│   │   ├── db/            # SQLite + FTS5 + sqlite-vec
│   │   ├── agent/         # AI tool-calling agent
│   │   └── python/        # MarkItDown + Playwright bridge
│   └── renderer/          # React 19 + Vite UI
│       ├── workspace/     # ChatGPT-style chat interface
│       ├── projects/      # Project management rail
│       ├── artifacts/     # Paper & artifact panel
│       └── settings/      # API keys, policies
├── tests/                 # Vitest test suite
└── package.json

Tech Stack:

Electron React TypeScript Vite SQLite TanStack Query Tailwind Framer Motion Zod Python


⚠️ Current Status

This is an early v1 — buildable, test-covered, but still hardening for production-level reliability.

Area Status
Core crawlers (OpenAlex, Crossref, arXiv, PubMed) ✅ Stable
SQLite + FTS5 + vector search ✅ Stable
AI agent (Ollama / OpenAI-compatible) ✅ Stable
Google Scholar crawler ⚠️ Experimental
macOS / Linux packaging ⚠️ Untested
Cloud sync / collaboration ❌ Not planned

🤝 Contributing

Contributions welcome. Please open an issue before large PRs to discuss approach.

npm run verify                 # Typecheck, tests, and production build
npm run test                   # Run test suite (Vitest)
npm run typecheck              # TypeScript strict checks
npm run test:crawlers:api      # Live no-key HTTP source smoke
npm run test:crawlers:browser  # Playwright browser crawler smoke

Built by a researcher, for researchers.

GitHub

Extension points exported contracts — how you extend this code

SourceConnector (Interface)
(no doc) [3 implementers]
src/main/sources/types.ts
Window (Interface)
(no doc)
src/types/paper-pilot-api.d.ts
ProjectBundle (Interface)
(no doc)
src/renderer/types.ts
ProjectBundle (Interface)
(no doc)
src/preload/index.ts
IpcServices (Interface)
(no doc)
src/main/ipc.ts
ScorePopoverPosition (Interface)
(no doc)
src/renderer/components/artifact-panel.tsx
ArtifactContent (Interface)
(no doc)
src/preload/index.ts
WindowState (Interface)
(no doc)
src/main/ipc.ts

Core symbols most depended-on inside this repo

cn
called by 100
src/renderer/lib/utils.ts
firstString
called by 68
src/main/sources/http.ts
run
called by 45
src/main/sources/types.ts
get
called by 42
src/main/services/job-queue.ts
createProject
called by 36
src/preload/index.ts
getProject
called by 27
src/main/db.ts
update
called by 23
src/main/services/job-queue.ts
create
called by 22
src/main/services/job-queue.ts

Shape

Function 341
Method 195
Class 32
Interface 32

Languages

TypeScript100%

Modules by API surface

src/main/db.ts69 symbols
src/preload/index.ts62 symbols
src/main/services/paper-scoring-service.ts26 symbols
src/renderer/components/ui/sidebar.tsx25 symbols
src/renderer/components/artifact-helpers.tsx24 symbols
src/renderer/components/pdf-artifact-preview.tsx23 symbols
src/main/services/artifact-service.ts21 symbols
src/main/services/ai-service.ts17 symbols
src/main/sources/http.ts16 symbols
src/main/ipc.ts16 symbols
src/renderer/components/ui/dropdown-menu.tsx15 symbols
src/main/services/local-agent-service.ts15 symbols

For agents

$ claude mcp add paper-pilot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact