Resolve papers (arXiv id / DOI / title) to canonical, normalized BibTeX for agents and humans
Project description
bibcite
Resolve papers (arXiv id / DOI / title) to canonical, normalized BibTeX, and manage .bib files so agents never hand-edit them.
The publication-matching cascade is ported from PaperMemory's bibMatcher: DBLP → Semantic Scholar → Google Scholar → CrossRef → Unpaywall. A match must have an identical normalized title, a plausible year, and a non-preprint venue.
Venue names are canonicalized against the @string table vendored in src/bibcite/data/strings.bib (journals / conferences / workshops), including year-aware rules (NIPS before 2018 vs NeurIPS, WACV before 2017).
Entry types are strict: conference/workshop papers become @inproceedings + booktitle, journal papers @article + journal, and unpublished arXiv preprints @misc + howpublished = {arXiv preprint arXiv:ID}.
Types coming from authoritative source BibTeX (DBLP) are preserved.
After every write, the file is formatted with bibtex-tidy using the canonical flags in bibfile.TIDY_ARGS (requires bibtex-tidy on PATH or npx).
Install
# from a local checkout (development)
uv tool install --editable .
# from git, no checkout needed
uv tool install git+https://github.com/<you>/bibcite
# once published to PyPI (package name bibcite-cli, command name bibcite)
uv tool install bibcite-cli # or: uvx --from bibcite-cli bibcite ...
# plus, once (required for the tidy step):
npm install -g bibtex-tidy
To use your own venue table instead of the vendored one, set BIBCITE_STRINGS=/path/to/strings.bib or place it at ~/.config/bibcite/strings.bib.
Usage
# Preview the BibTeX for a paper (nothing written)
bibcite get 1706.03762
bibcite get "Attention is all you need"
bibcite get 10.1109/CVPR52688.2022.01167
# Resolve and write into a .bib file, dedupe, then bibtex-tidy; prints the final key
bibcite add refs.bib 2103.14030 --json
# Add a raw BibTeX entry you already have (venue still canonicalized, file still tidied)
bibcite add refs.bib --bibtex "$(pbpaste)"
# One-shot cleanup: upgrade preprints → tidy → lint
bibcite fix refs.bib
# Upgrade every arXiv entry in a file to its published version (bibMatcher, CLI-style)
bibcite upgrade refs.bib --dry-run
# Just format, or just lint (check is read-only)
bibcite tidy refs.bib
bibcite check refs.bib
--json prints a machine-readable result on stdout (action, key, venue, source, ...); all diagnostics go to stderr.
add is idempotent: an existing entry returns action: exists with its key, and an existing arXiv entry matched to a published version is upgraded in place, keeping its citation key.
For agents
Never edit .bib files by hand.
Call bibcite add <file> <query> --json and use the returned key in \cite{...}.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bibcite_cli-0.2.0.tar.gz.
File metadata
- Download URL: bibcite_cli-0.2.0.tar.gz
- Upload date:
- Size: 35.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acaec7542bef7d8dccd2e15b8e3cda65d9d2031b5bafa7e2c79704ef2e76de8b
|
|
| MD5 |
3d2b14a769e5f4300b79f2cc4274923c
|
|
| BLAKE2b-256 |
e94bc7d1f1332ba02b753ec871c7ed249837338d90361a8c52c2ab71616e9910
|
File details
Details for the file bibcite_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: bibcite_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 27.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e282853e6d9e1ec631e7fb2de29ae4edefe0a142db155dc6eb1cf30e2cc440b
|
|
| MD5 |
0e9f860331580300128632bffac16b63
|
|
| BLAKE2b-256 |
e0a7495f3f3e1ebab845fa2a61dd8ddaf26ba4b1be13eb314717e4f6b3affbd3
|