Skip to main content

antifile

Extract BibTeX metadata from PDFs, EPUBs, URLs, and identifiers (DOI, arXiv, ISBN) and append it to a .bib file.

Install

pip install antifile
# or
uv tool install antifile

Usage

antifile INPUT -o refs.bib

INPUT can be:

  • a PDF or EPUB file — antifile paper.pdf -o refs.bib
  • a folder of PDFs/EPUBs — antifile ~/Downloads/papers -o refs.bib (add --recursive to descend into subfolders)
  • a URLantifile https://example.com/article -o refs.bib
  • a DOIantifile 10.1145/3292500 -o refs.bib
  • an arXiv IDantifile arXiv:1706.03762 -o refs.bib
  • an ISBNantifile 9780262033848 -o refs.bib

Entries are appended with de-duplication: a new entry matching an existing one (by DOI, arXiv ID, ISBN, or normalized title+author) fills in any missing fields rather than creating a duplicate. Pass --no-merge to skip on duplicate, or --force to append anyway with an auto-suffixed key.

Options

flag effect
-o, --output FILE target .bib (required; created if missing)
--method {auto,doi,arxiv,isbn,crossref,llm,claude-code,codex} force a PDF extraction method (default: auto)
--recursive recurse into subfolders for folder input
--no-preview skip the first-page PDF preview
--no-merge on duplicate, skip instead of filling missing fields
--force append even if a duplicate exists

LLM-assisted extraction

When a PDF has no resolvable identifier, antifile falls back to an LLM to read the first page. Set whichever API key you have — it's picked up from the environment:

export ANTHROPIC_API_KEY=...   # or OPENAI_API_KEY, or GEMINI_API_KEY / GOOGLE_API_KEY

With no API key set, antifile falls back to a CLI agent if one is installed — first the claude CLI, then the codex CLI. Each tier is skipped if its binary isn't on your PATH. Full chain:

DOI → arXiv → ISBN → CrossRef title → LLM API → claude CLI → codex CLI → none

Related

  • antilibrary — manage BibTeX libraries from the terminal (can call antifile via --add-from-files).
  • antifind — online metadata search → BibTeX.

License

MIT

Release files for antifile 0.1.7

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

Source distribution (sdist)

Source distribution for antifile 0.1.7
File Size Uploaded
antifile-0.1.7.tar.gz 40.0 kB Details

Built distribution (wheel)

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

Total release size: 67.3 kB

Release files / antifile-0.1.7.tar.gz

Download URL antifile-0.1.7.tar.gz
Size 40.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ea7a1aa5f1046fad6432949db8812df79cc1a06426fde9dd3f74e8988d16fa21
BLAKE2b-256 checksum
How to use checksums
020a39728fe0f9d7209d5f51dbdf9948c3f6ac7caffe96a70ac0239e641bf255
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / antifile-0.1.7-py3-none-any.whl

Download URL antifile-0.1.7-py3-none-any.whl
Size 27.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c94dfeeb04284f15b73753155ad0e45e220dd7f62887cd0d3f14ffec58ae1663
BLAKE2b-256 checksum
How to use checksums
7fe547d7cddcc6fe2fc67dbb512cd33754847fdcaf109e42dba86a7288452392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.1.9

2 release files

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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