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.5

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.5
File Size Uploaded
antifile-0.1.5.tar.gz 39.0 kB Details

Built distribution (wheel)

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

Total release size: 65.5 kB

Release files / antifile-0.1.5.tar.gz

Download URL antifile-0.1.5.tar.gz
Size 39.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f822f0ae493129537acb8dd5cae1514903043f92f753f3f15269f9a1c556bc91
BLAKE2b-256 checksum
How to use checksums
d2667362e15cdf5032a17a1e6e48c52a3a5a803b6e72c58c7f24a6de110dcdf4
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.5-py3-none-any.whl

Download URL antifile-0.1.5-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
882edad6f72d851d1571d77a7bfe2e322557104e4bd50a9c412943658bbc399a
BLAKE2b-256 checksum
How to use checksums
e9bbe17847a9319700ad2ea3f8aa14a8f8059e40d957cc38f689ca9a23daf2e8
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

0.1.7

2 release files

0.1.6

2 release files

This release

0.1.5 This release

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