papersearch 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +292 -0
- package/README.md +203 -125
- package/carsi/README.md +8 -2
- package/carsi/paper_search_carsi/__init__.py +1 -4
- package/carsi/paper_search_carsi/adapters/__init__.py +1 -1
- package/carsi/paper_search_carsi/adapters/base.py +2 -0
- package/carsi/paper_search_carsi/adapters/frontiers/__init__.py +45 -0
- package/carsi/paper_search_carsi/adapters/mdpi/__init__.py +33 -1
- package/carsi/paper_search_carsi/adapters/platforms/figshare/__init__.py +185 -0
- package/carsi/paper_search_carsi/adapters/thieme/__init__.py +6 -5
- package/carsi/paper_search_carsi/browser/__init__.py +8 -1
- package/carsi/paper_search_carsi/browser/backend.py +23 -147
- package/carsi/paper_search_carsi/browser/challenge_interaction.py +137 -0
- package/carsi/paper_search_carsi/browser/challenges.py +57 -0
- package/carsi/paper_search_carsi/browser/engine.py +2 -2
- package/carsi/paper_search_carsi/browser/preview.py +44 -26
- package/carsi/paper_search_carsi/browser/profiles.py +161 -0
- package/carsi/paper_search_carsi/browser/watchdog.py +71 -14
- package/carsi/paper_search_carsi/download_diagnostics.py +1 -1
- package/carsi/paper_search_carsi/engine/batch.py +129 -68
- package/carsi/paper_search_carsi/engine/batch_access.py +8 -3
- package/carsi/paper_search_carsi/engine/batch_capture.py +53 -8
- package/carsi/paper_search_carsi/engine/batch_common.py +27 -14
- package/carsi/paper_search_carsi/engine/batch_diagnostics.py +20 -15
- package/carsi/paper_search_carsi/engine/batch_login.py +47 -27
- package/carsi/paper_search_carsi/engine/batch_runs.py +2 -7
- package/carsi/paper_search_carsi/engine/batch_waits.py +82 -42
- package/carsi/paper_search_carsi/engine/bridge.py +16 -8
- package/carsi/paper_search_carsi/engine/supplements.py +22 -3
- package/carsi/paper_search_carsi/log.py +13 -7
- package/carsi/paper_search_carsi/orchestrator.py +7 -1
- package/carsi/paper_search_carsi/progress_bar.py +39 -18
- package/carsi/paper_search_carsi/server.py +8 -1
- package/carsi/pyproject.toml +1 -1
- package/dist/capabilities/citation-expansion/schemas.d.ts +2 -2
- package/dist/capabilities/metadata-search/MultiSourceSearchService.d.ts.map +1 -1
- package/dist/capabilities/metadata-search/MultiSourceSearchService.js +17 -4
- package/dist/capabilities/metadata-search/MultiSourceSearchService.js.map +1 -1
- package/dist/capabilities/metadata-search/handler.d.ts.map +1 -1
- package/dist/capabilities/metadata-search/handler.js +6 -0
- package/dist/capabilities/metadata-search/handler.js.map +1 -1
- package/dist/capabilities/metadata-search/schemas.d.ts +3 -3
- package/dist/capabilities/metadata-search/schemas.d.ts.map +1 -1
- package/dist/capabilities/metadata-search/schemas.js +1 -0
- package/dist/capabilities/metadata-search/schemas.js.map +1 -1
- package/dist/capabilities/metadata-search/tools.js +1 -1
- package/dist/capabilities/metadata-search/tools.js.map +1 -1
- package/dist/capabilities/pdf-discovery/DownloadTier.d.ts +11 -0
- package/dist/capabilities/pdf-discovery/DownloadTier.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/OpenAccessFallbackService.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/OpenAccessFallbackService.js +31 -1
- package/dist/capabilities/pdf-discovery/OpenAccessFallbackService.js.map +1 -1
- package/dist/capabilities/pdf-discovery/arxiv.d.ts +4 -0
- package/dist/capabilities/pdf-discovery/arxiv.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/arxiv.js +42 -0
- package/dist/capabilities/pdf-discovery/arxiv.js.map +1 -0
- package/dist/capabilities/pdf-discovery/batch.d.ts +1 -1
- package/dist/capabilities/pdf-discovery/batch.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/batch.js +56 -16
- package/dist/capabilities/pdf-discovery/batch.js.map +1 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiAttempt.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiAttempt.js +2 -0
- package/dist/capabilities/pdf-discovery/carsi/CarsiAttempt.js.map +1 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiMcpClient.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiMcpClient.js +3 -3
- package/dist/capabilities/pdf-discovery/carsi/CarsiMcpClient.js.map +1 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiReadiness.d.ts +2 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiReadiness.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiReadiness.js +3 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiReadiness.js.map +1 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiResultNormalizer.d.ts +1 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiResultNormalizer.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/carsi/CarsiResultNormalizer.js +4 -4
- package/dist/capabilities/pdf-discovery/carsi/CarsiResultNormalizer.js.map +1 -1
- package/dist/capabilities/pdf-discovery/carsi/types.d.ts +2 -0
- package/dist/capabilities/pdf-discovery/carsi/types.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/handler.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/handler.js +3 -2
- package/dist/capabilities/pdf-discovery/handler.js.map +1 -1
- package/dist/capabilities/pdf-discovery/oaHosts.d.ts +1 -1
- package/dist/capabilities/pdf-discovery/oaHosts.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/oaHosts.js +4 -4
- package/dist/capabilities/pdf-discovery/outputLayout.d.ts +29 -0
- package/dist/capabilities/pdf-discovery/outputLayout.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/outputLayout.js +144 -0
- package/dist/capabilities/pdf-discovery/outputLayout.js.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/directPdfUrl.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/tiers/directPdfUrl.js +6 -0
- package/dist/capabilities/pdf-discovery/tiers/directPdfUrl.js.map +1 -1
- package/dist/capabilities/pdf-discovery/tiers/entitledAccess.d.ts +2 -1
- package/dist/capabilities/pdf-discovery/tiers/entitledAccess.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/tiers/entitledAccess.js +8 -1
- package/dist/capabilities/pdf-discovery/tiers/entitledAccess.js.map +1 -1
- package/dist/capabilities/pdf-discovery/tiers/preprint.d.ts +5 -0
- package/dist/capabilities/pdf-discovery/tiers/preprint.d.ts.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/preprint.js +80 -0
- package/dist/capabilities/pdf-discovery/tiers/preprint.js.map +1 -0
- package/dist/capabilities/pdf-discovery/tiers/primary.js +2 -0
- package/dist/capabilities/pdf-discovery/tiers/primary.js.map +1 -1
- package/dist/capabilities/pdf-discovery/tiers/unpaywall.d.ts.map +1 -1
- package/dist/capabilities/pdf-discovery/tiers/unpaywall.js +12 -3
- package/dist/capabilities/pdf-discovery/tiers/unpaywall.js.map +1 -1
- package/dist/capabilities/pdf-discovery/types.d.ts +6 -0
- package/dist/capabilities/pdf-discovery/types.d.ts.map +1 -1
- package/dist/core/handleToolCall.d.ts.map +1 -1
- package/dist/core/handleToolCall.js +12 -0
- package/dist/core/handleToolCall.js.map +1 -1
- package/dist/core/schemas.d.ts +26 -1
- package/dist/core/schemas.d.ts.map +1 -1
- package/dist/core/schemas.js +13 -0
- package/dist/core/schemas.js.map +1 -1
- package/dist/core/searchers.d.ts +2 -0
- package/dist/core/searchers.d.ts.map +1 -1
- package/dist/core/searchers.js.map +1 -1
- package/dist/core/tools.d.ts.map +1 -1
- package/dist/core/tools.js +30 -0
- package/dist/core/tools.js.map +1 -1
- package/dist/infrastructure/arxiv.d.ts +5 -0
- package/dist/infrastructure/arxiv.d.ts.map +1 -0
- package/dist/infrastructure/arxiv.js +36 -0
- package/dist/infrastructure/arxiv.js.map +1 -0
- package/dist/infrastructure/pdf/PdfDownload.d.ts +2 -0
- package/dist/infrastructure/pdf/PdfDownload.d.ts.map +1 -1
- package/dist/infrastructure/pdf/PdfDownload.js +14 -0
- package/dist/infrastructure/pdf/PdfDownload.js.map +1 -1
- package/dist/infrastructure/runlog/RunLedger.d.ts.map +1 -1
- package/dist/infrastructure/runlog/RunLedger.js +17 -1
- package/dist/infrastructure/runlog/RunLedger.js.map +1 -1
- package/dist/management/carsi/installer.d.ts +1 -1
- package/dist/platforms/ArxivSearcher.d.ts +62 -0
- package/dist/platforms/ArxivSearcher.d.ts.map +1 -0
- package/dist/platforms/ArxivSearcher.js +544 -0
- package/dist/platforms/ArxivSearcher.js.map +1 -0
- package/dist/platforms/SemanticScholarSearcher.d.ts.map +1 -1
- package/dist/platforms/SemanticScholarSearcher.js +4 -4
- package/dist/platforms/SemanticScholarSearcher.js.map +1 -1
- package/dist/registry/platformFactories.d.ts.map +1 -1
- package/dist/registry/platformFactories.js +2 -0
- package/dist/registry/platformFactories.js.map +1 -1
- package/dist/registry/platformMetadata.d.ts +1 -1
- package/dist/registry/platformMetadata.d.ts.map +1 -1
- package/dist/registry/platformMetadata.js +16 -0
- package/dist/registry/platformMetadata.js.map +1 -1
- package/package.json +2 -2
- package/skills/paper-search/SKILL.md +7 -4
- package/skills/paper-search/references/browser-download.md +7 -6
- package/skills/paper-search/references/capability-routing.md +4 -3
- package/skills/paper-search/references/cli-contract.md +10 -3
- package/skills/paper-search/references/publisher-support.md +6 -4
- package/skills/paper-search/references/troubleshooting.md +1 -1
- package/README.zh.md +0 -214
package/README.en.md
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
# PaperSearch
|
|
2
|
+
|
|
3
|
+
[简体中文](README.md) | English
|
|
4
|
+
|
|
5
|
+
**Let your AI tools search the literature, verify citations, and download full texts and supplementary files.**
|
|
6
|
+
|
|
7
|
+
PaperSearch provides the `paper-search` command and a bundled Skill. Once installed, Claude Code, Codex, Cursor, Kimi Code, Qwen Code, CodeBuddy, TRAE and other AI tools that can run local commands can search more than 20 scholarly sources for you, verify DOIs, and download and organize paper PDFs and supplementary files. You can also use it directly in a terminal or a script; output is JSON by default.
|
|
8
|
+
|
|
9
|
+
- **Open access, downloaded directly**: PubMed Central, Unpaywall, publisher APIs and more, ready as soon as it is installed.
|
|
10
|
+
- **Your school's subscriptions too**: the optional institutional download extension signs in to your school through CARSI and fetches the papers and supplementary files your school can access, in batches. It handles verification automatically and resumes downloading when the site grants access.
|
|
11
|
+
- **Every paper checked**: each PDF's first page is checked against the DOI and title; a file of another article is not counted as a success.
|
|
12
|
+
- **Ready to use**: one folder per paper named journal_year_title, with the main text and supplementary files together; papers not downloaded come with a reason.
|
|
13
|
+
|
|
14
|
+
[](https://www.npmjs.com/package/papersearch)
|
|
15
|
+

|
|
16
|
+

|
|
17
|
+
[](https://linux.do)
|
|
18
|
+
|
|
19
|
+
[What you get](#what-you-get) | [Quick start](#quick-start) | [Common tasks](#common-tasks) | [How it works](#how-it-works) | [Institutional download extension](#institutional-download-extension) | [Search sources](#search-sources) | [Configuration](#configuration) | [Agent Skill](#agent-skill) | [Commands](#commands) | [Troubleshooting](#troubleshooting)
|
|
20
|
+
|
|
21
|
+
## What you get
|
|
22
|
+
|
|
23
|
+
Ask your AI tool in one sentence, for example:
|
|
24
|
+
|
|
25
|
+
> Find randomized trials of SGLT2 inhibitors in heart failure since 2020, verify the DOIs, and download the full texts and supplementary files to ./downloads
|
|
26
|
+
|
|
27
|
+
The AI calls PaperSearch to search, verify and download, then tells you what it got, what it could not get, and why. This is the result of an actual download:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
downloads/
|
|
31
|
+
├── papers/
|
|
32
|
+
│ ├── Nutrients_2026_α-Ketoglutarate Alleviates the Pathogenesis…_0b6e0203de/
|
|
33
|
+
│ │ ├── Nutrients_2026_α-Ketoglutarate Alleviates the Pathogenesis….pdf
|
|
34
|
+
│ │ └── supplements/
|
|
35
|
+
│ │ └── nutrients-18-03600-s001.zip supplementary files keep their names
|
|
36
|
+
│ └── arXiv_2017_Attention Is All You Need_a1a0262a54/
|
|
37
|
+
│ └── arXiv_2017_Attention Is All You Need.pdf preprints are labelled
|
|
38
|
+
└── diagnostics/ run records, file manifests, screenshots
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
<!-- Screenshot: the institutional download progress window. Keep images outside docs/ (e.g. assets/progress-window.png); docs/ is not published to the public repository -->
|
|
42
|
+
|
|
43
|
+
## Quick start
|
|
44
|
+
|
|
45
|
+
Requires Node.js 18 or later and npm.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install -g papersearch
|
|
49
|
+
paper-search setup
|
|
50
|
+
paper-search doctor --format text
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`paper-search setup` asks three things in turn: API keys and email; whether to install the Skill in a shared directory or tool-specific directories; and whether to install the institutional download extension. Each can be skipped. `doctor` shows what works now and what is still missing.
|
|
54
|
+
|
|
55
|
+
The Skill is the instruction file that teaches an AI tool to call `paper-search`; install it when you use an AI tool for literature work. If you skipped it, install it any time, with `--targets` set to your tool (`claude`, `codex`, `cursor`, `gemini`, `agents`, or `all`):
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
paper-search skills update --targets claude
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
For Kimi Code and Qwen Code, use `--targets agents` to install into the shared directory. See [Agent Skill](#agent-skill) below for TRAE and CodeBuddy.
|
|
62
|
+
|
|
63
|
+
You can also send this to your AI tool and let it do the install:
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
Please install PaperSearch for me: run npm install -g papersearch, then install the bundled Skill for yourself using the README's Agent Skill instructions (agents for Kimi Code and Qwen Code, claude for Claude Code, codex for Codex, cursor for Cursor; TRAE and CodeBuddy use their own Skill directories), then run paper-search doctor --format text and tell me which features work and which keys are missing. I will enter API keys myself with paper-search setup in a terminal; do not ask me to paste them into the chat.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Coming from the old package `paper-search-cli`**: run `npm uninstall -g paper-search-cli`, then `npm install -g papersearch`. Both provide the same `paper-search` command and cannot be installed together; your configuration, Skill, school login and download records stay.
|
|
70
|
+
|
|
71
|
+
**Later upgrades**: `npm install -g papersearch@latest`. The first `paper-search` run after an upgrade brings the Skill you installed up to the new version.
|
|
72
|
+
|
|
73
|
+
## Common tasks
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Search papers (a set of sources that needs no keys)
|
|
77
|
+
paper-search search "machine learning clinical prediction" --sources no-key --max-results 5 --pretty
|
|
78
|
+
|
|
79
|
+
# One source, for example PubMed
|
|
80
|
+
paper-search search "SGLT2 inhibitor heart failure" --platform pubmed --max-results 10 --pretty
|
|
81
|
+
|
|
82
|
+
# Verify a DOI
|
|
83
|
+
paper-search run get_paper_by_doi --arg doi="10.1038/nature12373" --pretty
|
|
84
|
+
|
|
85
|
+
# Citing papers; for references use get_paper_references
|
|
86
|
+
paper-search run get_paper_citations --arg doi="10.1038/nature12373" --arg limit=5 --pretty
|
|
87
|
+
|
|
88
|
+
# Journal impact factors and quartiles (EasyScholar key)
|
|
89
|
+
paper-search journal-metrics "Nature" "BMJ" --pretty
|
|
90
|
+
|
|
91
|
+
# Find Methods wording in body text (Semantic Scholar key)
|
|
92
|
+
paper-search run search_semantic_snippets --arg query="propensity score matching" --arg limit=3 --pretty
|
|
93
|
+
|
|
94
|
+
# Download one paper
|
|
95
|
+
paper-search download "<DOI>" --platform crossref --save-path ./downloads
|
|
96
|
+
|
|
97
|
+
# Download main texts and supplementary files in a batch (omit content for main text only; "supplements" for supplementary files only)
|
|
98
|
+
paper-search run download_batch --json-args '{"items":[{"doi":"<DOI-1>"},{"doi":"<DOI-2>"}],"savePath":"./downloads","content":"both"}'
|
|
99
|
+
|
|
100
|
+
# Papers not downloaded, and why
|
|
101
|
+
paper-search failures --format text
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## How it works
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
A literature request
|
|
108
|
+
│
|
|
109
|
+
├─ Find papers, verify DOI/PMID → paper-search search (Crossref, PubMed, OpenAlex, ...)
|
|
110
|
+
│ └─ Entries confirmed, full text needed → go to "Download" below
|
|
111
|
+
├─ Citing papers, references → paper-search run get_paper_citations / get_paper_references
|
|
112
|
+
├─ Impact factor, quartiles → paper-search journal-metrics (EasyScholar key)
|
|
113
|
+
├─ Methods wording, parameters → paper-search run search_semantic_snippets (Semantic Scholar key)
|
|
114
|
+
│
|
|
115
|
+
└─ Download main text, supplementary files → paper-search download / run download_with_fallback / run download_batch
|
|
116
|
+
One download command, tried in order:
|
|
117
|
+
├─ ① Open downloading (built in): the source's own download, PMC, Unpaywall, publisher APIs
|
|
118
|
+
├─ ② Sci-Hub fallback (on by default, can be turned off)
|
|
119
|
+
├─ ③ Institutional download (optional extension): a browser signs in to your school through CARSI and takes the PDF and supplementary files from the publisher's site
|
|
120
|
+
├─ ④ arXiv preprint: only when no published version was found, and labelled as a preprint
|
|
121
|
+
├─ Every file is checked against the DOI and title on its first page; once one passes it is saved and the rest are not tried
|
|
122
|
+
└─ Nothing found → paper-search failures says why
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Two ways to download
|
|
126
|
+
|
|
127
|
+
| | Open downloading (default) | Institutional download (optional extension) |
|
|
128
|
+
|---|---|---|
|
|
129
|
+
| Available | As soon as PaperSearch is installed | After `paper-search carsi install` |
|
|
130
|
+
| Gets | Open-access main text | Main text your school subscribes to; supplementary files from the publishers with rules for them |
|
|
131
|
+
| How | Direct downloads, usually seconds, no login: the source's own download, PDF links in the metadata, PubMed Central, Unpaywall, publisher APIs (your own Elsevier/Springer keys); last, the Sci-Hub fallback, on by default | A browser signs in to your school through CARSI and takes the PDF from the publisher's site |
|
|
132
|
+
| What you do | Nothing | Sign in to your school in the browser; verification is handled automatically, with a prompt when manual action is needed |
|
|
133
|
+
|
|
134
|
+
Both use the same download command: open downloading first, and when it finds nothing, the institutional download if it is installed.
|
|
135
|
+
|
|
136
|
+
- For dozens to hundreds of papers, use one `download_batch`: open channels are tried for every paper first, then the institutional download for papers still without a main text. Afterwards `paper-search failures` sorts the papers not downloaded into four classes: no access (with the evidence, such as the page's own words), needs you (login, verification, waiting), site not supported yet, and cause unknown.
|
|
137
|
+
- For arXiv papers the published version is tried first; the preprint is downloaded only when none was found. The result says `version: "preprint"` and, when known, gives the published DOI.
|
|
138
|
+
- To leave out Sci-Hub, set `"useSciHub": false` in `download_with_fallback` / `download_batch`.
|
|
139
|
+
- Every PDF is checked against the DOI and title on its first page; a file that does not match is not counted as a success and is kept aside for review.
|
|
140
|
+
|
|
141
|
+
### Download results
|
|
142
|
+
|
|
143
|
+
A download folder has two parts. `papers/` holds the papers, one folder each, with the main text named journal_year_title and supplementary files under that paper's `supplements/` with their original names. `diagnostics/` holds run records, file manifests and screenshots, for tracking down problems. The short ID at the end of a folder name tells apart papers with the same title. A missing journal or year is written as unknown. Files downloaded by earlier versions are not moved; the JSON a command returns gives each file's actual location.
|
|
144
|
+
|
|
145
|
+
## Institutional download extension
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
paper-search carsi install
|
|
149
|
+
paper-search carsi status --format text
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
- Installing asks for your school (a CARSI member school, by Chinese name, English name or domain) and downloads the dedicated Camoufox browser, about 3 GB in all; on macOS, `--browser ego` uses ego lite instead, about 0.5 GB. `--skip-school` leaves the school for later.
|
|
153
|
+
- Schools sign in through CARSI (the Chinese university identity federation). When a publisher's institution list has no CARSI or no entry for your school, the program says so at once; download on campus or through your school's VPN instead.
|
|
154
|
+
- Automatic verification: verification checkboxes are located and clicked automatically, and downloads resume when the site grants access. Each verification wait allows up to three attempts, at least three seconds apart. If verification remains unresolved after the automatic phase, the progress window prompts for manual action.
|
|
155
|
+
- Downloads show a progress window: skip this paper, mark the journal or publisher as no access, stop the whole task, or change how long waits last (the gear at the top right). On the school's login page a paper waits up to 3 minutes by default; anywhere else (human checks, publisher pages, ...) it ends after 1 minute.
|
|
156
|
+
- Which publishers' main texts and supplementary files it can fetch is in the [publisher support table](skills/paper-search/references/publisher-support.md) (Chinese). Both have been fetched from Elsevier, Wiley, Springer Nature, OUP, Wolters Kluwer, Taylor & Francis, Sage, ACS, NEJM, ASCE, Dove and others; supplementary files from MDPI and Frontiers and Figshare files linked to a paper are also supported; IEEE, Thieme and others give the main text only; sites not in the table are tried with the shared rules.
|
|
157
|
+
- `paper-search carsi update` updates the extension after a PaperSearch upgrade; `paper-search carsi uninstall` removes it (keeping the browser and the school settings by default).
|
|
158
|
+
- Windows: if PowerShell blocks `npm.ps1`, use `npm.cmd` or Command Prompt; downloads must run in a desktop session, as a browser window cannot open from SSH or a system service.
|
|
159
|
+
|
|
160
|
+
## Search sources
|
|
161
|
+
|
|
162
|
+
| Kind | Sources | API key |
|
|
163
|
+
|---|---|---|
|
|
164
|
+
| General academic metadata | Crossref, OpenAlex, Semantic Scholar, Google Scholar | None (Semantic Scholar body snippets need one) |
|
|
165
|
+
| Biomedicine | PubMed, PubMed Central, Europe PMC | None (a PubMed key raises the limits) |
|
|
166
|
+
| Preprints and conference papers | arXiv, bioRxiv, medRxiv, OpenReview, IACR ePrint | None |
|
|
167
|
+
| Computer science and engineering | DBLP, ACM, USENIX | None |
|
|
168
|
+
| Open access and repositories | CORE, OpenAIRE, Unpaywall | Unpaywall takes an email; CORE and OpenAIRE optional |
|
|
169
|
+
| Publishers and citation databases | ScienceDirect, Scopus, Springer Nature, IEEE Xplore, Web of Science | Each needs its key (ScienceDirect and Scopus share the Elsevier key) |
|
|
170
|
+
| Journal metrics | EasyScholar | Needed |
|
|
171
|
+
|
|
172
|
+
- The sources that need no key already cover the major publishers' papers; a key adds the publisher's own search.
|
|
173
|
+
- One source with `--platform`, several with `--sources a,b,c`; `--sources no-key` needs no keys at all (Crossref, PubMed, Europe PMC, arXiv, OpenReview).
|
|
174
|
+
- Google Scholar is read from its web pages and often meets human checks, so it is not in `--sources all`; use `--platform googlescholar` when you need it.
|
|
175
|
+
- The same paper from several sources is merged by DOI; when an arXiv preprint is explicitly linked to its published DOI, the published record is kept.
|
|
176
|
+
- Sci-Hub is not a search source; it only serves as a DOI fallback when downloading.
|
|
177
|
+
|
|
178
|
+
## Configuration
|
|
179
|
+
|
|
180
|
+
PaperSearch has two separate kinds of configuration, and both are optional:
|
|
181
|
+
|
|
182
|
+
| | API keys | CARSI (institutional download extension) |
|
|
183
|
+
|---|---|---|
|
|
184
|
+
| What it is for | Search in some sources, journal metrics, body snippet search; Elsevier and Springer keys also fetch full text through the publisher API | Signing in to your school and downloading full texts and supplementary files through its subscriptions |
|
|
185
|
+
| How to set it up | `paper-search setup`, or `paper-search config set` | `paper-search carsi install`, choosing your school |
|
|
186
|
+
| Without it | Search uses the free sources; the sources and features that need a key under "Search sources" are unavailable | Downloads use the open channels only (see [Two ways to download](#two-ways-to-download)) |
|
|
187
|
+
|
|
188
|
+
### API keys and the configuration file
|
|
189
|
+
|
|
190
|
+
Most free sources need nothing. Run `paper-search setup` first to save keys in your user configuration:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
paper-search setup
|
|
194
|
+
paper-search config list --pretty
|
|
195
|
+
paper-search config set SEMANTIC_SCHOLAR_API_KEY <your key>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
The configuration file is `~/.config/paper-search-cli/config.json` (mode `0600`; the folder keeps its old name, so upgrades keep your settings). `config list` and `doctor` show keys masked.
|
|
199
|
+
|
|
200
|
+
| Key | Use | When |
|
|
201
|
+
|---|---|---|
|
|
202
|
+
| `SEMANTIC_SCHOLAR_API_KEY` | Body snippet search; steadier Semantic Scholar requests | For Methods details, or frequent Semantic Scholar use |
|
|
203
|
+
| `UNPAYWALL_EMAIL` | Open-access PDFs by DOI | Recommended; an email is enough |
|
|
204
|
+
| `CROSSREF_MAILTO` | Crossref's polite pool | Long or frequent searches |
|
|
205
|
+
| `CORE_API_KEY` | CORE repository search | Frequent CORE use, or rate limits |
|
|
206
|
+
| `EASYSCHOLAR_KEY` | Journal metrics | For impact factors and quartiles; `paper-search setup EASYSCHOLAR_KEY` hides the input |
|
|
207
|
+
| `PUBMED_API_KEY`, `NCBI_EMAIL` | Higher PubMed limits | Frequent PubMed use |
|
|
208
|
+
| `WOS_API_KEY`, `IEEE_API_KEY`, `ELSEVIER_API_KEY`, `SPRINGER_API_KEY` | Their metadata; Elsevier and Springer keys also serve the publisher API for full text (access follows your network or key) | When you use those sources |
|
|
209
|
+
| `ELSEVIER_INSTTOKEN` | Elsevier full text off campus through its API | Off campus; not needed on a campus network |
|
|
210
|
+
| `GOOGLE_SCHOLAR_PROXY_URL` | Egress proxy for Google Scholar | When direct requests keep being challenged; use a proxy you are allowed to use |
|
|
211
|
+
| `PAPER_SEARCH_CARSI_ENABLED` | Switch for the institutional download extension | Set by `paper-search carsi install` |
|
|
212
|
+
| `PAPER_SEARCH_SKILL_AUTO_UPDATE` | `false` stops upgrades from updating the installed Skill | On by default; set it to manage the Skill yourself |
|
|
213
|
+
|
|
214
|
+
Where to get keys: [EasyScholar](https://www.easyscholar.cc/console/user/open) · [Semantic Scholar](https://www.semanticscholar.org/product/api) · [Unpaywall](https://unpaywall.org/products/api) · [CORE](https://core.ac.uk/services/api) · [NCBI](https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/) · [Web of Science](https://developer.clarivate.com/apis) · [IEEE Xplore](https://developer.ieee.org/docs/read/Searching_the_IEEE_Xplore_Metadata_API) · [Elsevier](https://dev.elsevier.com/apikey/manage) · [Springer Nature](https://dev.springernature.com/) · [OpenAIRE](https://develop.openaire.eu/)
|
|
215
|
+
|
|
216
|
+
### CARSI
|
|
217
|
+
|
|
218
|
+
Installing and using it: see [Institutional download extension](#institutional-download-extension). It uses no API key and does not search.
|
|
219
|
+
|
|
220
|
+
## Agent Skill
|
|
221
|
+
|
|
222
|
+
The Skill ships in the npm package (`skills/paper-search/`). It is written in Chinese, opens with the same overall diagram, and points the AI to focused references as needed: routing and the open download channels, the command contract, installing and using the institutional download, the [publisher support table](skills/paper-search/references/publisher-support.md), and troubleshooting. It only tells the AI how to call `paper-search`; it keeps no keys, cookies or accounts.
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
paper-search skills status --pretty
|
|
226
|
+
paper-search skills update --targets claude
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
AI tools from Chinese providers can load the same Skill:
|
|
230
|
+
|
|
231
|
+
| Tool | Setup |
|
|
232
|
+
|---|---|
|
|
233
|
+
| [Kimi Code](https://www.kimi.com/code/docs/kimi-code-cli/customization/skills.html), [Qwen Code](https://github.com/QwenLM/qwen-code/blob/main/docs/users/features/skills.md) | Run `paper-search skills update --targets agents` to install into the shared `~/.agents/skills/paper-search/` directory supported by both tools |
|
|
234
|
+
| [TRAE](https://docs.trae.ai/ide/skills?_lang=zh) | Copy the bundled Skill folder to `.trae/skills/paper-search/` in your project |
|
|
235
|
+
| [CodeBuddy](https://www.codebuddy.ai/docs/zh/ide/Features/Skills) | Copy the bundled Skill folder to `.codebuddy/skills/paper-search/` in your project |
|
|
236
|
+
|
|
237
|
+
Run `npm root -g` to locate the global npm directory; the bundled Skill is under `papersearch/skills/paper-search/` there. Copy the entire folder, including `references/`, and copy it again after an update. Start a new AI session after installation.
|
|
238
|
+
|
|
239
|
+
- Targets: `agents`, `codex`, `claude`, `cursor`, `gemini`, `antigravity`, `all`. Updating overwrites the files the package manages and keeps files you added to the Skill directory.
|
|
240
|
+
- **Auto-update after upgrades**: Skills installed through the built-in targets are updated on the first `paper-search` run after an upgrade (other than `skills` and `setup`): only where they were installed; replaced files are backed up under `~/.local/share/paper-search-cli/skill-backups/`; one line on stderr says what changed. With no Skill installed in those locations, it says once how to install it. To turn it off: `paper-search config set PAPER_SEARCH_SKILL_AUTO_UPDATE false`.
|
|
241
|
+
- `paper-search doctor` shows Skill locations and version status for the built-in installation targets.
|
|
242
|
+
|
|
243
|
+
## Commands
|
|
244
|
+
|
|
245
|
+
| Command | Use |
|
|
246
|
+
|---|---|
|
|
247
|
+
| `paper-search search` | Search paper metadata |
|
|
248
|
+
| `paper-search journal-metrics` | Journal metrics (EasyScholar) |
|
|
249
|
+
| `paper-search download` | Download the PDF of a verified paper |
|
|
250
|
+
| `paper-search run <tool>` | Call one tool exactly, with `--arg` or `--json-args` |
|
|
251
|
+
| `paper-search failures` | Why downloads failed, summarized |
|
|
252
|
+
| `paper-search carsi` | Install, check, update or remove the institutional download extension |
|
|
253
|
+
| `paper-search setup` / `config` | Configure keys, the Skill and the extension |
|
|
254
|
+
| `paper-search doctor` | Health check: configuration, available features, Skill and extension status |
|
|
255
|
+
| `paper-search skills` | Skill status, differences and updates |
|
|
256
|
+
| `paper-search smoke` | Offline or live self-check |
|
|
257
|
+
| `paper-search tools` | All tool names and their arguments |
|
|
258
|
+
|
|
259
|
+
Commands print JSON by default; `--pretty` formats it and `--format text` prints a report for people. All commands: `paper-search tools --pretty`, or the [command contract](skills/paper-search/references/cli-contract.md) (Chinese).
|
|
260
|
+
|
|
261
|
+
## Troubleshooting
|
|
262
|
+
|
|
263
|
+
| Problem | What to do |
|
|
264
|
+
|---|---|
|
|
265
|
+
| `paper-search` not found | Reinstall with `npm install -g papersearch` |
|
|
266
|
+
| `EEXIST` while installing | The old package is still there: `npm uninstall -g paper-search-cli` first |
|
|
267
|
+
| A feature does not work | `paper-search doctor --format text` shows what is missing; then `paper-search setup` |
|
|
268
|
+
| Subscribed articles do not download | `paper-search carsi status --format text` for the extension; `paper-search failures --format text` for each paper's reason |
|
|
269
|
+
| A source rate-limits | Lower `--max-results`, configure its key, or switch sources |
|
|
270
|
+
| Google Scholar shows a human check | Wait and retry, or use `--sources no-key` |
|
|
271
|
+
| The AI reads an old Skill | `paper-search skills status --pretty`, then `paper-search skills update --targets <tool>`; start a new AI session |
|
|
272
|
+
|
|
273
|
+
## Roadmap and contributing
|
|
274
|
+
|
|
275
|
+
- Next: steadier batch downloads and smoother installs on new computers; beyond PDFs, a full-text package (the original XML/HTML, Markdown and the figures). See the [roadmap](docs/ROADMAP.zh.md) (Chinese).
|
|
276
|
+
- How it works inside and where the code is: [architecture](docs/ARCHITECTURE.zh.md) (Chinese).
|
|
277
|
+
- A download failed, or you want a publisher supported: open an issue with the output of `paper-search failures --format text` (remove anything you do not want to make public first).
|
|
278
|
+
- To add publisher rules yourself: see [carsi/CONTRIBUTING.md](carsi/CONTRIBUTING.md).
|
|
279
|
+
|
|
280
|
+
## Use responsibly
|
|
281
|
+
|
|
282
|
+
Some sources are subject to platform terms, institutional subscriptions or local law; use them only where you have access. The institutional download uses your own school account and subscriptions; the source labels in results are for diagnosis and are not proof of entitlement.
|
|
283
|
+
|
|
284
|
+
## Origins
|
|
285
|
+
|
|
286
|
+
- Thanks to the [LinuxDo](https://linux.do) community, where the command-plus-Skill approach and workflow improvements came from discussion and open sharing.
|
|
287
|
+
- [openags/paper-search-mcp](https://github.com/openags/paper-search-mcp): the project draws on its ideas, reworked into a standalone command.
|
|
288
|
+
- [Rimagination/scansci-pdf](https://github.com/Rimagination/scansci-pdf) (MIT): the institutional download backend (`carsi/`) draws on its architecture (CARSI and other federation sign-in, publisher site capture, session reuse, PDF capture); its copyright notice is kept in `carsi/NOTICE`.
|
|
289
|
+
|
|
290
|
+
## License
|
|
291
|
+
|
|
292
|
+
MIT
|