with one click
fetch-paper
// Fetch a non-accessible paper PDF via Sci-Hub. Use when a paper is behind a paywall or not freely available. Accepts a DOI, paper URL, or arXiv ID.
// Fetch a non-accessible paper PDF via Sci-Hub. Use when a paper is behind a paywall or not freely available. Accepts a DOI, paper URL, or arXiv ID.
| name | fetch-paper |
| description | Fetch a non-accessible paper PDF via Sci-Hub. Use when a paper is behind a paywall or not freely available. Accepts a DOI, paper URL, or arXiv ID. |
Download a paper PDF that is behind a paywall using Sci-Hub.
Use a background subagent for the steps. If you are downloading multiple papers, use max 4 concurrent subagents.
10.1016/j.jfineco.2023.01.001), paper URL, or arXiv IDDetermine the identifier:
10.), use it directly2301.12345)doi.org/10.xxx), extract the DOI partUse the fetch-scihub.sh script: The script handles all Sci-Hub interaction (multiple mirrors, CAPTCHA bypass via headless Chrome, PDF extraction and verification).
./scripts/fetch-scihub.sh "<doi-or-url>" "articles/<filename>.pdf"
The script will:
If fetch-scihub.sh fails, try alternative approaches:
navigate to go to https://sci-hub.st/{identifier}, ask user to solve CAPTCHA if needed, then extract PDF URL via javascript_tool and download with curlGenerate the filename (if not provided):
Verify the download:
ls -la articles/FILENAME.pdf
file articles/FILENAME.pdf
Report result:
articles/FILENAME.pdfFor fetching many papers at once, use the batch script:
# Dry run — see what needs fetching
./scripts/fetch-missing-papers.sh --dry-run
# Fetch with 2 parallel jobs (default)
./scripts/fetch-missing-papers.sh
# Fetch with 4 parallel jobs
./scripts/fetch-missing-papers.sh --parallel 4
The batch script has a mapping of filename → DOI for known papers. Add new entries to the PAPERS associative array in the script.
Add a new research paper to the documentation collection. Use when user provides a URL to a paper or tweet linking to one.
Add a new code repository to the documentation collection. Use when user provides a URL to a GitHub, GitLab, Bitbucket, source repository, or a discussion linking to one.
Add a new book to the documentation collection. Use when user provides a URL to a book page or tweet linking to one.
Add a new blog post or article to the documentation collection. Use when user provides a URL to a blog post, article, or tweet linking to one.
Pick a random item from the trading content collection and compose a tweet about it on X.