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--recursiveto descend into subfolders) - a URL —
antifile https://example.com/article -o refs.bib - a DOI —
antifile 10.1145/3292500 -o refs.bib - an arXiv ID —
antifile arXiv:1706.03762 -o refs.bib - an ISBN —
antifile 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 →
claudeCLI →codexCLI → none
Related
- antilibrary — manage BibTeX libraries from the terminal (can call antifile via
--add-from-files). - antifind — online metadata search → BibTeX.
License
MIT
Metadata
Release files for antifile 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| antifile-0.1.9.tar.gz | 41.4 kB | Without provenance | Details for antifile-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| antifile-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for antifile-0.1.9-py3-none-any.whl |
Total release size: 69.5 kB
Release files / antifile-0.1.9.tar.gz
| Download URL | antifile-0.1.9.tar.gz |
|---|---|
| Size | 41.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18a4eaa7459dd21978c0b29295efd1971f53bc9261225be39e93e385b18eb735
|
|
BLAKE2b-256 checksum How to use checksums |
32d48c18767a777d2cda0aeac426774eb3314b08ca47ca4ffa973dd698c0c33d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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.9-py3-none-any.whl
| Download URL | antifile-0.1.9-py3-none-any.whl |
|---|---|
| Size | 28.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed4586cdb8504e2a27a5539f3af3c8356d22138a07009bbd7a820dea00923a0c
|
|
BLAKE2b-256 checksum How to use checksums |
d7c96f5bcf0a114df1413eddc9fb9d426264cac7c7e61df23ad44515740f611a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
|
Security for antifile 0.1.9
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.