paper-search-cli 0.1.0
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/.env.example +165 -0
- package/LICENSE +21 -0
- package/README-sc.md +642 -0
- package/README.md +642 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +637 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/ConfigService.d.ts +26 -0
- package/dist/config/ConfigService.d.ts.map +1 -0
- package/dist/config/ConfigService.js +145 -0
- package/dist/config/ConfigService.js.map +1 -0
- package/dist/config/constants.d.ts +140 -0
- package/dist/config/constants.d.ts.map +1 -0
- package/dist/config/constants.js +93 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/core/diagnostics.d.ts +43 -0
- package/dist/core/diagnostics.d.ts.map +1 -0
- package/dist/core/diagnostics.js +544 -0
- package/dist/core/diagnostics.js.map +1 -0
- package/dist/core/handleToolCall.d.ts +8 -0
- package/dist/core/handleToolCall.d.ts.map +1 -0
- package/dist/core/handleToolCall.js +440 -0
- package/dist/core/handleToolCall.js.map +1 -0
- package/dist/core/schemas.d.ts +454 -0
- package/dist/core/schemas.d.ts.map +1 -0
- package/dist/core/schemas.js +322 -0
- package/dist/core/schemas.js.map +1 -0
- package/dist/core/searchers.d.ts +45 -0
- package/dist/core/searchers.d.ts.map +1 -0
- package/dist/core/searchers.js +73 -0
- package/dist/core/searchers.js.map +1 -0
- package/dist/core/tools.d.ts +7 -0
- package/dist/core/tools.d.ts.map +1 -0
- package/dist/core/tools.js +640 -0
- package/dist/core/tools.js.map +1 -0
- package/dist/models/Paper.d.ts +64 -0
- package/dist/models/Paper.d.ts.map +1 -0
- package/dist/models/Paper.js +70 -0
- package/dist/models/Paper.js.map +1 -0
- package/dist/platforms/ArxivSearcher.d.ts +64 -0
- package/dist/platforms/ArxivSearcher.d.ts.map +1 -0
- package/dist/platforms/ArxivSearcher.js +531 -0
- package/dist/platforms/ArxivSearcher.js.map +1 -0
- package/dist/platforms/BioRxivSearcher.d.ts +47 -0
- package/dist/platforms/BioRxivSearcher.d.ts.map +1 -0
- package/dist/platforms/BioRxivSearcher.js +196 -0
- package/dist/platforms/BioRxivSearcher.js.map +1 -0
- package/dist/platforms/CORESearcher.d.ts +16 -0
- package/dist/platforms/CORESearcher.d.ts.map +1 -0
- package/dist/platforms/CORESearcher.js +148 -0
- package/dist/platforms/CORESearcher.js.map +1 -0
- package/dist/platforms/CrossrefSearcher.d.ts +34 -0
- package/dist/platforms/CrossrefSearcher.d.ts.map +1 -0
- package/dist/platforms/CrossrefSearcher.js +339 -0
- package/dist/platforms/CrossrefSearcher.js.map +1 -0
- package/dist/platforms/EuropePMCSearcher.d.ts +20 -0
- package/dist/platforms/EuropePMCSearcher.d.ts.map +1 -0
- package/dist/platforms/EuropePMCSearcher.js +173 -0
- package/dist/platforms/EuropePMCSearcher.js.map +1 -0
- package/dist/platforms/GoogleScholarSearcher.d.ts +77 -0
- package/dist/platforms/GoogleScholarSearcher.d.ts.map +1 -0
- package/dist/platforms/GoogleScholarSearcher.js +262 -0
- package/dist/platforms/GoogleScholarSearcher.js.map +1 -0
- package/dist/platforms/IACRSearcher.d.ts +51 -0
- package/dist/platforms/IACRSearcher.d.ts.map +1 -0
- package/dist/platforms/IACRSearcher.js +339 -0
- package/dist/platforms/IACRSearcher.js.map +1 -0
- package/dist/platforms/OpenAIRESearcher.d.ts +22 -0
- package/dist/platforms/OpenAIRESearcher.d.ts.map +1 -0
- package/dist/platforms/OpenAIRESearcher.js +223 -0
- package/dist/platforms/OpenAIRESearcher.js.map +1 -0
- package/dist/platforms/OpenAlexSearcher.d.ts +14 -0
- package/dist/platforms/OpenAlexSearcher.d.ts.map +1 -0
- package/dist/platforms/OpenAlexSearcher.js +114 -0
- package/dist/platforms/OpenAlexSearcher.js.map +1 -0
- package/dist/platforms/PMCSearcher.d.ts +20 -0
- package/dist/platforms/PMCSearcher.d.ts.map +1 -0
- package/dist/platforms/PMCSearcher.js +177 -0
- package/dist/platforms/PMCSearcher.js.map +1 -0
- package/dist/platforms/PaperSource.d.ts +143 -0
- package/dist/platforms/PaperSource.d.ts.map +1 -0
- package/dist/platforms/PaperSource.js +125 -0
- package/dist/platforms/PaperSource.js.map +1 -0
- package/dist/platforms/PubMedSearcher.d.ts +104 -0
- package/dist/platforms/PubMedSearcher.d.ts.map +1 -0
- package/dist/platforms/PubMedSearcher.js +422 -0
- package/dist/platforms/PubMedSearcher.js.map +1 -0
- package/dist/platforms/SciHubSearcher.d.ts +66 -0
- package/dist/platforms/SciHubSearcher.d.ts.map +1 -0
- package/dist/platforms/SciHubSearcher.js +398 -0
- package/dist/platforms/SciHubSearcher.js.map +1 -0
- package/dist/platforms/ScienceDirectSearcher.d.ts +42 -0
- package/dist/platforms/ScienceDirectSearcher.d.ts.map +1 -0
- package/dist/platforms/ScienceDirectSearcher.js +326 -0
- package/dist/platforms/ScienceDirectSearcher.js.map +1 -0
- package/dist/platforms/ScopusSearcher.d.ts +43 -0
- package/dist/platforms/ScopusSearcher.d.ts.map +1 -0
- package/dist/platforms/ScopusSearcher.js +364 -0
- package/dist/platforms/ScopusSearcher.js.map +1 -0
- package/dist/platforms/SemanticScholarSearcher.d.ts +96 -0
- package/dist/platforms/SemanticScholarSearcher.d.ts.map +1 -0
- package/dist/platforms/SemanticScholarSearcher.js +419 -0
- package/dist/platforms/SemanticScholarSearcher.js.map +1 -0
- package/dist/platforms/SpringerSearcher.d.ts +54 -0
- package/dist/platforms/SpringerSearcher.d.ts.map +1 -0
- package/dist/platforms/SpringerSearcher.js +407 -0
- package/dist/platforms/SpringerSearcher.js.map +1 -0
- package/dist/platforms/UnpaywallSearcher.d.ts +18 -0
- package/dist/platforms/UnpaywallSearcher.d.ts.map +1 -0
- package/dist/platforms/UnpaywallSearcher.js +115 -0
- package/dist/platforms/UnpaywallSearcher.js.map +1 -0
- package/dist/platforms/WebOfScienceSearcher.d.ts +111 -0
- package/dist/platforms/WebOfScienceSearcher.d.ts.map +1 -0
- package/dist/platforms/WebOfScienceSearcher.js +500 -0
- package/dist/platforms/WebOfScienceSearcher.js.map +1 -0
- package/dist/platforms/WileySearcher.d.ts +44 -0
- package/dist/platforms/WileySearcher.d.ts.map +1 -0
- package/dist/platforms/WileySearcher.js +148 -0
- package/dist/platforms/WileySearcher.js.map +1 -0
- package/dist/services/CitationService.d.ts +66 -0
- package/dist/services/CitationService.d.ts.map +1 -0
- package/dist/services/CitationService.js +237 -0
- package/dist/services/CitationService.js.map +1 -0
- package/dist/services/MultiSourceSearchService.d.ts +19 -0
- package/dist/services/MultiSourceSearchService.d.ts.map +1 -0
- package/dist/services/MultiSourceSearchService.js +96 -0
- package/dist/services/MultiSourceSearchService.js.map +1 -0
- package/dist/services/OpenAccessFallbackService.d.ts +20 -0
- package/dist/services/OpenAccessFallbackService.d.ts.map +1 -0
- package/dist/services/OpenAccessFallbackService.js +124 -0
- package/dist/services/OpenAccessFallbackService.js.map +1 -0
- package/dist/utils/ErrorHandler.d.ts +99 -0
- package/dist/utils/ErrorHandler.d.ts.map +1 -0
- package/dist/utils/ErrorHandler.js +266 -0
- package/dist/utils/ErrorHandler.js.map +1 -0
- package/dist/utils/Logger.d.ts +6 -0
- package/dist/utils/Logger.d.ts.map +1 -0
- package/dist/utils/Logger.js +26 -0
- package/dist/utils/Logger.js.map +1 -0
- package/dist/utils/PDFExtractor.d.ts +34 -0
- package/dist/utils/PDFExtractor.d.ts.map +1 -0
- package/dist/utils/PDFExtractor.js +130 -0
- package/dist/utils/PDFExtractor.js.map +1 -0
- package/dist/utils/PdfDownload.d.ts +7 -0
- package/dist/utils/PdfDownload.d.ts.map +1 -0
- package/dist/utils/PdfDownload.js +52 -0
- package/dist/utils/PdfDownload.js.map +1 -0
- package/dist/utils/QuotaManager.d.ts +32 -0
- package/dist/utils/QuotaManager.d.ts.map +1 -0
- package/dist/utils/QuotaManager.js +95 -0
- package/dist/utils/QuotaManager.js.map +1 -0
- package/dist/utils/RateLimiter.d.ts +50 -0
- package/dist/utils/RateLimiter.d.ts.map +1 -0
- package/dist/utils/RateLimiter.js +121 -0
- package/dist/utils/RateLimiter.js.map +1 -0
- package/dist/utils/RequestCache.d.ts +26 -0
- package/dist/utils/RequestCache.d.ts.map +1 -0
- package/dist/utils/RequestCache.js +66 -0
- package/dist/utils/RequestCache.js.map +1 -0
- package/dist/utils/SecurityUtils.d.ts +80 -0
- package/dist/utils/SecurityUtils.d.ts.map +1 -0
- package/dist/utils/SecurityUtils.js +357 -0
- package/dist/utils/SecurityUtils.js.map +1 -0
- package/package.json +111 -0
- package/skills/paper-search/SKILL.md +192 -0
package/.env.example
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# Paper Search CLI - Environment Variables
|
|
3
|
+
# ==============================================================================
|
|
4
|
+
# Supports 20 academic sources/platforms with a unified CLI interface
|
|
5
|
+
# Platforms: Crossref, OpenAlex, PubMed, PubMed Central, Europe PMC, arXiv,
|
|
6
|
+
# bioRxiv, medRxiv, Semantic Scholar, CORE, OpenAIRE, Web of Science,
|
|
7
|
+
# Google Scholar, IACR ePrint, Sci-Hub, ScienceDirect, Springer, Wiley,
|
|
8
|
+
# Scopus, Unpaywall
|
|
9
|
+
#
|
|
10
|
+
# For global installs, prefer:
|
|
11
|
+
# paper-search config set KEY VALUE
|
|
12
|
+
# The user-level config path is:
|
|
13
|
+
# ~/.config/paper-search-cli/config.json
|
|
14
|
+
|
|
15
|
+
# ==============================================================================
|
|
16
|
+
# API KEYS CONFIGURATION
|
|
17
|
+
# ==============================================================================
|
|
18
|
+
|
|
19
|
+
# ------------------------------------------------------------------------------
|
|
20
|
+
# Web of Science (Clarivate) - REQUIRED
|
|
21
|
+
# ------------------------------------------------------------------------------
|
|
22
|
+
# Premium citation database with high-quality journal indexing
|
|
23
|
+
# Get API key: https://developer.clarivate.com/apis
|
|
24
|
+
# Pricing: Paid subscription required
|
|
25
|
+
# Rate limit: Depends on subscription level
|
|
26
|
+
WOS_API_KEY=your_web_of_science_api_key_here
|
|
27
|
+
WOS_API_VERSION=v1
|
|
28
|
+
|
|
29
|
+
# ------------------------------------------------------------------------------
|
|
30
|
+
# PubMed/NCBI E-utilities - OPTIONAL (but recommended)
|
|
31
|
+
# ------------------------------------------------------------------------------
|
|
32
|
+
# Biomedical literature database
|
|
33
|
+
# Without API key: 3 requests/second limit
|
|
34
|
+
# With API key: 10 requests/second limit
|
|
35
|
+
# Get API key: https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/
|
|
36
|
+
# Pricing: Free
|
|
37
|
+
PUBMED_API_KEY=your_ncbi_api_key_here
|
|
38
|
+
NCBI_EMAIL=you@example.com
|
|
39
|
+
NCBI_TOOL=paper-search-cli
|
|
40
|
+
|
|
41
|
+
# ------------------------------------------------------------------------------
|
|
42
|
+
# Semantic Scholar - OPTIONAL (increases rate limits)
|
|
43
|
+
# ------------------------------------------------------------------------------
|
|
44
|
+
# AI-powered academic search with semantic understanding
|
|
45
|
+
# Required for search_semantic_snippets; strongly recommended for normal search
|
|
46
|
+
# Without API key: ~20 requests/minute (free tier)
|
|
47
|
+
# With API key: ~180 requests/minute (partner tier)
|
|
48
|
+
# Get API key: https://www.semanticscholar.org/product/api
|
|
49
|
+
# Pricing: Free for academic use
|
|
50
|
+
SEMANTIC_SCHOLAR_API_KEY=your_semantic_scholar_api_key_here
|
|
51
|
+
|
|
52
|
+
# ------------------------------------------------------------------------------
|
|
53
|
+
# Unpaywall - REQUIRED for DOI-based open-access resolution
|
|
54
|
+
# ------------------------------------------------------------------------------
|
|
55
|
+
# Used by search_unpaywall and download_with_fallback
|
|
56
|
+
# Get details: https://unpaywall.org/products/api
|
|
57
|
+
# Pricing: Free, but requires a contact email
|
|
58
|
+
PAPER_SEARCH_UNPAYWALL_EMAIL=you@example.com
|
|
59
|
+
# Legacy-compatible fallback name
|
|
60
|
+
UNPAYWALL_EMAIL=you@example.com
|
|
61
|
+
|
|
62
|
+
# ------------------------------------------------------------------------------
|
|
63
|
+
# CORE - OPTIONAL (but recommended)
|
|
64
|
+
# ------------------------------------------------------------------------------
|
|
65
|
+
# Open repository metadata and PDF candidates
|
|
66
|
+
# Anonymous access can be heavily rate-limited
|
|
67
|
+
# Get API key: https://core.ac.uk/services/api
|
|
68
|
+
# Pricing: Free tier available
|
|
69
|
+
PAPER_SEARCH_CORE_API_KEY=your_core_api_key_here
|
|
70
|
+
# Legacy-compatible fallback name
|
|
71
|
+
CORE_API_KEY=your_core_api_key_here
|
|
72
|
+
|
|
73
|
+
# ------------------------------------------------------------------------------
|
|
74
|
+
# OpenAIRE - OPTIONAL
|
|
75
|
+
# ------------------------------------------------------------------------------
|
|
76
|
+
# Open repository discovery source; public search usually works without a key
|
|
77
|
+
# API docs: https://develop.openaire.eu/
|
|
78
|
+
PAPER_SEARCH_OPENAIRE_API_KEY=your_openaire_api_key_here
|
|
79
|
+
# Legacy-compatible fallback name
|
|
80
|
+
OPENAIRE_API_KEY=your_openaire_api_key_here
|
|
81
|
+
|
|
82
|
+
# ------------------------------------------------------------------------------
|
|
83
|
+
# Elsevier API - REQUIRED for ScienceDirect and Scopus
|
|
84
|
+
# ------------------------------------------------------------------------------
|
|
85
|
+
# Single API key works for both platforms:
|
|
86
|
+
# - ScienceDirect: Full-text scientific database
|
|
87
|
+
# - Scopus: Largest abstract and citation database
|
|
88
|
+
# Get API key: https://dev.elsevier.com/apikey/manage
|
|
89
|
+
# Pricing: Free tier available with usage limits
|
|
90
|
+
# Rate limit: 10 requests/second with key, 20 requests/minute without
|
|
91
|
+
ELSEVIER_API_KEY=your_elsevier_api_key_here
|
|
92
|
+
|
|
93
|
+
# ------------------------------------------------------------------------------
|
|
94
|
+
# Springer Nature API - REQUIRED for Springer
|
|
95
|
+
# ------------------------------------------------------------------------------
|
|
96
|
+
# Dual API system:
|
|
97
|
+
# - Metadata API v2: Search all Springer content (subscription + open access)
|
|
98
|
+
# Endpoint: https://api.springernature.com/meta/v2/json
|
|
99
|
+
# - OpenAccess API: Search and download open access papers only
|
|
100
|
+
# Endpoint: https://api.springernature.com/openaccess/json
|
|
101
|
+
# Note: OpenAccess API may require special permissions on your API key
|
|
102
|
+
#
|
|
103
|
+
# Get API key: https://dev.springernature.com/signup
|
|
104
|
+
# Documentation: https://dev.springernature.com/
|
|
105
|
+
# Pricing: Free with 5000 requests/day limit (shared between both APIs)
|
|
106
|
+
# Rate limit: ~200 requests/hour (conservative)
|
|
107
|
+
#
|
|
108
|
+
# Primary API key (required - works for Metadata API v2)
|
|
109
|
+
SPRINGER_API_KEY=your_springer_api_key_here
|
|
110
|
+
#
|
|
111
|
+
# Optional: Separate OpenAccess API key (if different from main key)
|
|
112
|
+
# Only set this if you have a separate key specifically for OpenAccess API
|
|
113
|
+
# SPRINGER_OPENACCESS_API_KEY=your_openaccess_api_key_here
|
|
114
|
+
|
|
115
|
+
# ------------------------------------------------------------------------------
|
|
116
|
+
# Wiley Text and Data Mining (TDM) - REQUIRED for Wiley
|
|
117
|
+
# ------------------------------------------------------------------------------
|
|
118
|
+
# Access to Wiley Online Library for text and data mining
|
|
119
|
+
# Get TDM token: https://onlinelibrary.wiley.com/library-info/resources/text-and-datamining
|
|
120
|
+
# Pricing: Requires institutional affiliation or subscription
|
|
121
|
+
# Rate limit: ~100 requests/hour (conservative estimate)
|
|
122
|
+
WILEY_TDM_TOKEN=your_wiley_tdm_token_here
|
|
123
|
+
|
|
124
|
+
# ==============================================================================
|
|
125
|
+
# PLATFORM STATUS SUMMARY
|
|
126
|
+
# ==============================================================================
|
|
127
|
+
#
|
|
128
|
+
# Platform | API Key | Features | Best For
|
|
129
|
+
# ------------------|------------|-------------------------------|------------------
|
|
130
|
+
# Crossref | ✅ Free | Broad metadata, citations | Default search
|
|
131
|
+
# OpenAlex | ✅ Free | Broad metadata, OA locations | Open discovery
|
|
132
|
+
# arXiv | ✅ Free | Preprints, PDF download | Physics, CS, Math
|
|
133
|
+
# Web of Science | 🔴 Required| Citation analysis, metrics | Impact research
|
|
134
|
+
# PubMed | 🟡 Optional| Medical literature | Biomedical
|
|
135
|
+
# PubMed Central | ✅ Free | Open full text, PDFs | Biomedical OA
|
|
136
|
+
# Europe PMC | ✅ Free | Open links, biomedical data | Biomedical OA
|
|
137
|
+
# Google Scholar | ✅ Free | Comprehensive coverage | General search
|
|
138
|
+
# bioRxiv | ✅ Free | Biology preprints, PDF | Biology research
|
|
139
|
+
# medRxiv | ✅ Free | Medical preprints, PDF | Medical research
|
|
140
|
+
# Semantic Scholar | 🟡 Optional| AI-powered search, citations | CS, AI research
|
|
141
|
+
# CORE | 🟡 Optional| Repository PDFs | Open repositories
|
|
142
|
+
# OpenAIRE | 🟡 Optional| Repository discovery | Open repositories
|
|
143
|
+
# Unpaywall | 📧 Email | DOI OA resolution | Fallback downloads
|
|
144
|
+
# IACR ePrint | ✅ Free | Cryptography papers, PDF | Cryptography
|
|
145
|
+
# Sci-Hub | ✅ Free | Universal DOI access | Any paper by DOI
|
|
146
|
+
# ScienceDirect | 🔴 Required| Elsevier journals | Full-text search
|
|
147
|
+
# Springer | 🔴 Required| Dual API (Meta+OpenAccess) | Books & journals
|
|
148
|
+
# Wiley | 🔴 Required| TDM API, full text mining | Data mining
|
|
149
|
+
# Scopus | 🔴 Required| Citation database | Bibliometrics
|
|
150
|
+
#
|
|
151
|
+
# Legend: ✅ No key needed | 🟡 Optional key | 🔴 Key required | 📧 Email required
|
|
152
|
+
|
|
153
|
+
# ==============================================================================
|
|
154
|
+
# CLI RUNTIME CONFIGURATION
|
|
155
|
+
# ==============================================================================
|
|
156
|
+
NODE_ENV=production
|
|
157
|
+
LOG_LEVEL=info
|
|
158
|
+
|
|
159
|
+
# Download Configuration
|
|
160
|
+
DEFAULT_DOWNLOAD_PATH=./downloads
|
|
161
|
+
MAX_FILE_SIZE_MB=100
|
|
162
|
+
|
|
163
|
+
# Rate Limiting
|
|
164
|
+
RATE_LIMIT_REQUESTS_PER_MINUTE=60
|
|
165
|
+
RATE_LIMIT_BURST=10
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Dianel555
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|