A CLI tool for downloading arxiv papers by URL or ID, and semantically searching your local collection.
- Download papers as PDFs and index them with sentence-transformer embeddings
- Search your local collection using natural language queries (semantic similarity)
- Find similar papers to one you already have
- Manage the embedding model and download directory via config
- Tab completion for all commands and flags
Requires Python 3.11+.
git clone <repo>
cd arxiv_fetch
uv pip install -e .arxiv-fetch completions install
# then open a new terminal, or:
source ~/.zshrcThese apply to any command and go before the subcommand:
-v,--verbose— show embedding-model loading logs and progress bars (hidden by default)
arxiv-fetch -v download 2301.07041
arxiv-fetch -v search "attention mechanisms in transformers"Download a paper by arxiv URL or paper ID. The PDF is saved to your configured download directory and indexed for search.
arxiv-fetch download 2301.07041
arxiv-fetch download https://arxiv.org/abs/2301.07041
arxiv-fetch download https://arxiv.org/html/2301.07041v1Accepted input formats:
- Bare paper ID:
2301.07041or2301.07041v2 /abs/URL:https://arxiv.org/abs/2301.07041/html/URL:https://arxiv.org/html/2301.07041v1(HTML reader view)
Semantic search over your downloaded papers using a natural language query.
arxiv-fetch search "attention mechanisms in transformers"
arxiv-fetch search "reinforcement learning from human feedback" --top 10Options:
--top N— number of results to show (default: 5)
Find papers in your local collection that are semantically similar to a given paper (must already be downloaded).
arxiv-fetch similar 2301.07041
arxiv-fetch similar 2301.07041 --top 10Options:
--top N— number of results to show (default: 5)
Get or set configuration values.
arxiv-fetch config get download_dir
arxiv-fetch config set download_dir ~/Papers
arxiv-fetch config set embedding_model all-mpnet-base-v2Config keys:
download_dir— where PDFs are saved (default:~/Downloads)embedding_model— sentence-transformer model used for indexing (default:all-MiniLM-L6-v2)
Note: changing
embedding_modelrequires re-downloading papers to rebuild embeddings.
Browse available sentence-transformer models on HuggingFace, with download counts and local cache status.
arxiv-fetch models listarxiv-fetch completions install # write zsh completion script to ~/.oh-my-zsh/custom/| Path | Purpose |
|---|---|
~/.config/arxiv-fetch/config.toml |
Configuration file |
~/.config/arxiv-fetch/papers.db |
SQLite index of downloaded papers |
~/Downloads |
Default PDF download directory |