Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arxiv-fetch

A CLI tool for downloading arxiv papers by URL or ID, and semantically searching your local collection.

What it does

  • 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

Installation

Requires Python 3.11+.

git clone <repo>
cd arxiv_fetch
uv pip install -e .

Tab completion (optional)

arxiv-fetch completions install
# then open a new terminal, or:
source ~/.zshrc

Commands

Global options

These 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

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.07041v1

Accepted input formats:

  • Bare paper ID: 2301.07041 or 2301.07041v2
  • /abs/ URL: https://arxiv.org/abs/2301.07041
  • /html/ URL: https://arxiv.org/html/2301.07041v1 (HTML reader view)

search

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 10

Options:

  • --top N — number of results to show (default: 5)

similar

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 10

Options:

  • --top N — number of results to show (default: 5)

config

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-v2

Config 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_model requires re-downloading papers to rebuild embeddings.

models

Browse available sentence-transformer models on HuggingFace, with download counts and local cache status.

arxiv-fetch models list

completions

arxiv-fetch completions install   # write zsh completion script to ~/.oh-my-zsh/custom/

Config & data locations

Path Purpose
~/.config/arxiv-fetch/config.toml Configuration file
~/.config/arxiv-fetch/papers.db SQLite index of downloaded papers
~/Downloads Default PDF download directory

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages