antilibrary
Manage BibTeX libraries, extract metadata from files and URLs, and search online databases from the terminal.
Install
pip install antilibrary
# or
uv tool install antilibrary
File extraction and online search are included. This installs the antilibrary,
antifile, antifind, and antilibrary-chrome-host commands.
Add-ons and documentation
- Chrome add-on — save pages and documents from the browser.
- Emacs add-on — browse libraries and insert citations in Emacs.
- File extraction and online search.
- Migrating from the separate packages.
- Development and releases.
Both add-ons live in this repository and are installed separately. Neither is included in the Python wheel or source distribution. The Python native-messaging host used by Chrome is included in the Python package.
Usage
Antilibrary manages one or more libraries — each a .bib file with an
optional folder for associated files (PDFs, EPUBs, …). Libraries live in
~/.config/antilibrary/config.toml (override with $ANTILIBRARY_CONFIG).
# Register a library (the first one becomes the default)
antilibrary library add main --bib ~/refs/main.bib --files ~/refs/files
antilibrary library add movies --bib ~/media/movies.bib # no files folder
antilibrary library list # show configured libraries
antilibrary library set-default movies # change the default
antilibrary library remove movies # forget a library (add --purge to delete its files)
Once a default is set, the entry commands operate on it. Use -l/--library NAME
to target another:
antilibrary add # interactively add an entry
antilibrary add -l movies # add to the movies library
antilibrary get smith2024 # print citation for a key
antilibrary browse # list entries
antilibrary browse -q "attention" # fuzzy search
antilibrary browse -t "nlp,transformers" # filter by tags
antilibrary remove smith2024 # delete an entry (+ its managed file)
The library is resolved in this order: -l/--library NAME, then -f/--file FILE
(ad-hoc, no files folder), then $ANTILIBRARY_BIB, then the configured default.
Associated files
If a library has a files folder, attaching a file copies it there and renames
it to the entry's key (e.g. smith2024.pdf); the entry's file field stores the
relative name. If the library has no files folder, the file is left in place and
file stores its absolute path. Removing an entry deletes its managed file (pass
--keep-file to keep it).
antilibrary add --attach ~/Downloads/paper.pdf # attach during interactive add
Citation styles
antilibrary get KEY --style {bibtex|bibtex-full|latex|org-cite|pandoc} prints
a citation in the requested format:
| style | output |
|---|---|
bibtex |
smith2024 |
bibtex-full |
the whole entry |
latex |
\cite{smith2024} |
org-cite |
[cite:@smith2024] |
pandoc |
[@smith2024] |
Adding entries
antilibrary add is interactive — it prompts for type, title, author, year,
key, and any extra fields. Adding an entry that matches an existing one
(by DOI, arXiv ID, ISBN, or normalized title+author) silently fills any
empty fields on the existing entry rather than creating a duplicate. Pass
--no-merge to skip on duplicate, or --force to append anyway with an
auto-suffixed key.
Bulk add from files or online search
Antilibrary includes two Python subpackages and their commands:
- antilibrary.antifile — extract BibTeX from PDFs, EPUBs, URLs, DOIs, arXiv IDs, or ISBNs.
- antilibrary.antifind — online search (movies, TV, music, papers, books) → BibTeX.
Use them directly from Python:
from antilibrary.antifile import extract
from antilibrary.antifind import search
Add entries in bulk. Files that resolve to a real path are attached using the library's files-folder rules:
antilibrary add --add-from-files paper.pdf book.epub 10.1145/3292500
antilibrary add --add-from-search "attention is all you need" --kind papers --limit 3
For PDFs, antifile resolves metadata by identifier (DOI / arXiv / ISBN) or a
CrossRef title match. When none of those work it falls back to an LLM: set
ANTHROPIC_API_KEY (or OPENAI_API_KEY / GEMINI_API_KEY) and that key is
passed through. With no key set, it still tries the claude CLI if it's on your
PATH.
License
MIT
Metadata
Release files for antilibrary 0.4.0
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 |
|---|---|---|---|---|
| antilibrary-0.4.0.tar.gz | 84.7 kB | Without provenance | Details for antilibrary-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| antilibrary-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for antilibrary-0.4.0-py3-none-any.whl |
Total release size: 148.5 kB
Release files / antilibrary-0.4.0.tar.gz
| Download URL | antilibrary-0.4.0.tar.gz |
|---|---|
| Size | 84.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b7551cb89169224e4417a47e6be7aaa88700cf8b148083c605b06194a45fbd0
|
|
BLAKE2b-256 checksum How to use checksums |
48f2e9cb749cc08b6455d1949aa4f8f646193fe43b809ef0aec8522a79ed140b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / antilibrary-0.4.0-py3-none-any.whl
| Download URL | antilibrary-0.4.0-py3-none-any.whl |
|---|---|
| Size | 63.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee0d674177eef29767aecd05e9fdcc0febbdf9d5667634b4853030dc0efbbb2a
|
|
BLAKE2b-256 checksum How to use checksums |
97e22f704945db52eeed3d7bd6085d484d87b14d340e515b335b83fbef0a9412
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for antilibrary 0.4.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.