Skip to main content

License

refren: scientific manuscript PDF renamer

Scenario: when you download a scientific paper from the Internet, the PDF file is usually named someting cryptic like 2506.19540v1.pdf

refren renames it to FirstAuthor_SecondAuthor_JournalAbbrev_Year.pdf using Claude AI to extract bibliographic metadata from the PDF

Conveniently, it can also download the supplemental data for the manuscript automatically

Usage

refren <pdf_file> [--remove] [--supplement]

--remove deletes the original PDF after creating the renamed copy.

--supplement also searches the web for the paper's supplementary material and downloads it. If a supplement is found and successfully downloaded, refren creates a FirstAuthor_SecondAuthor_JournalAbbrev_Year/ folder and puts both the renamed PDF and the downloaded supplement inside it. If no supplement can be found or downloaded (e.g. the publisher blocks automated downloads), refren falls back to the normal behavior: just rename the PDF in place, no folder created.

--supplement reliability by source

Many publishers block automated downloads outright, so this is best-effort, not guaranteed. As last verified:

Source Status Notes
arXiv ✅ Works Checked directly via arXiv's own ancillary-files listing, not a web search
Nature / Springer journals ⚠️ Inconsistent Direct supplement links sometimes stale/403 even for real, existing files
PubMed Central (PMC) ❌ Doesn't work Article pages are readable, but file downloads are blocked by NCBI's bot-detection challenge
Elsevier / ScienceDirect ❌ Doesn't work Site returns 403 to automated requests outright
Other publishers ❓ Unknown Untested

Examples

$ refren 1758-2946-6-10.pdf 
  (calling Claude API...)
  First author last name : Krstajic
  Second author last name: Buturovic
  Journal                : Journal of Cheminformatics -> J Cheminform
  Year                   : 2014

  1758-2946-6-10.pdf  ->  Krstajic_Buturovic_JCheminform_2014.pdf
Copied to: Krstajic_Buturovic_JCheminform_2014.pdf


$ refren 2608.14705v1.pdf --supplement
  (calling Claude API...)
  Article type           : research
  First author last name : Buturović
  Second author last name: 
  Journal                : arXiv -> arXiv
  Year                   : 2026

  (checking arXiv for ancillary files...)

  2608.14705v1.pdf  ->  Buturović__arXiv_2026/Buturović__arXiv_2026.pdf
  Supplement saved to: Buturović__arXiv_2026/
    arXiv-2608.14705v1.tar.gz

Install

$ pipx install refren # Linux, Mac

Requires an ANTHROPIC_API_KEY environment variable. If you don't have the API key, please read SETUP.md for instructions.

Development

cd ~/github/refren
rm -f dist/*
uv run python -m build
uv run twine upload dist/*

Metadata

Release files for refren 0.17.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for refren 0.17.0
File Size Uploaded Provenance
refren-0.17.0.tar.gz 13.5 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for refren 0.17.0
File Interpreter ABI Platform
refren-0.17.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.5 MB

Release files / refren-0.17.0.tar.gz

Download URL refren-0.17.0.tar.gz
Size 13.5 MB
Tags Source
SHA-256 checksum
How to use checksums
428e9dbd802643f87ea98e6b53685127b96a68118bd14cacf5e1251aa6e111b0
BLAKE2b-256 checksum
How to use checksums
274fcc40b48d9cd113596e38111f1ce2b6a8e04a7aa51c4ca14231c63b2d92c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Release files / refren-0.17.0-py3-none-any.whl

Download URL refren-0.17.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
931ea29fcae2ee5c6156e497aa49074f4dd2578024cd8fc0e0d89afef8bcd564
BLAKE2b-256 checksum
How to use checksums
bfe4ca1130ec8cd8d7a7631fc661276d937a8628d9127c3acc3f47fcd19a35b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Security for refren 0.17.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page