mosaic get
Downloads the PDF of one paper by DOI, or of every DOI in a BibTeX or CSV file. Papers that fail can be retried in a browser: one mosaic drives (--interactive) or your own (--handoff).
Usage
mosaic get 10.3389/fphy.2019.00140 # one paper
mosaic get --from refs.bib # every DOI in a BibTeX file
mosaic get --from refs.csv --oa-only # papers with no open copy count as skipped
mosaic get 10.1016/j.paerosci.2006.01.001 --handoff # download it yourself; mosaic files it
mosaic get --from refs.bib --interactive # retry failures in a visible browser
mosaic get 10.3389/fphy.2019.00140 --download-dir ~/papers/projectBehaviour
Where the PDF comes from, in order: a PDF already recorded for the paper in the cache; the paper's known PDF link; up to six open-access locations Unpaywall knows (needs mosaic config --unpaywall-email); a saved browser session (mosaic auth). Every file is checked to start with the PDF signature: an HTML page is never saved as a PDF. See downloads.
Metadata. Title, authors and year come from the cache, or from Crossref, so the file gets the same name a search would give it (filename_pattern, default {year}_{source}_{author}_{title}).
--from reads every doi = {...} field of a .bib file, or the doi column (any case) of a .csv file. Duplicates are downloaded once. One line per DOI, then a summary: downloaded, failed, skipped.
--interactive opens the failed papers in a browser window mosaic controls, with your saved sessions, where you log in or pass a check; it needs the browser extra. --handoff opens them one at a time in your default browser and watches the downloads folder (--watch-dir, or the detected one): the next PDF that appears is moved into the library under the paper's name. Press Enter when done with a paper, or to skip it. Hand-off works where publishers refuse any automated browser, as Elsevier does.
Exit code 1 if you give both a DOI and --from, neither, or a file that does not exist or has the wrong type; if the DOI has no downloadable copy; or, with --from, if any paper failed. Papers counted as skipped with --oa-only do not make it fail.
See also: tutorial 4, tutorial 5, downloading recipes, paywalls recipes.
Options
mosaic get [OPTIONS] [DOI]| Argument | Value | Description |
|---|---|---|
DOI | TEXT | DOI of the paper to download (optional) |
| Option | Value | Default | Description |
|---|---|---|---|
--from | PATH | BibTeX (.bib) or CSV (.csv) file containing DOIs to bulk-download | |
--oa-only | Treat unresolvable papers as skipped rather than failed | ||
--download-dir | TEXT | Override PDF download directory for this run | |
--zotero | Export downloaded paper(s) to Zotero | ||
--zotero-collection | TEXT | Zotero collection name (created if missing) | |
--zotero-local | Force Zotero local API even when an API key is configured | ||
--obsidian | Export paper(s) as notes to an Obsidian vault | ||
--obsidian-folder | TEXT | Override Obsidian vault subfolder for this run | |
--interactive, -i | Retry failed papers in a visible browser where you can log in or solve checks | ||
--handoff | Open failed papers in your own browser and file the PDFs you download (works where publishers block automated browsers, e.g. Elsevier) | ||
--auto | Retry failed papers with your own Chrome driven by mosaic over CDP (the Elsevier-included real-browser pass; needs Chrome/Edge installed) | ||
--max-auto | INTEGER RANGE | 50 | Papers --auto may attempt per run (it drives a real browser: keep it sane) |
--watch-dir | PATH | Browser download folder for --handoff (default: auto-detect) | |
--batch | INTEGER RANGE | 1 | Papers --handoff opens at once; download them in any order |

