Skip to main content

PyPI version License PRs Welcome Changelog Downloads

A Python tool that fixes and standardizes your BibTeX. It not only completes entries with accurate metadata via LLM + web search capabilities, but also enforces a consistent style based on your preferences (e.g., venue naming, title casing, author format, page ranges). This removes the tedious manual work of hunting down sources and cleaning messy entries (like those copied from Google Scholar), producing a clean, uniform bib file. A consistent style improves readability and leaves a stronger impression on readers and reviewers.

[!WARNING] bibfixer is experimental and uses LLM + web search, so it may occasionally produce incomplete or incorrect metadata/formatting. Always review the final .bib before submission. For known limitations and ongoing issues (and to report new ones), please see the GitHub Issues.

Examples

Example (1) Original bib entry from Google Scholar. Additional authors are omitted and indicated by "and others", and "ai" is not capitalized.

@article{bai2022constitutional,
 author = {Bai, Yuntao and Kadavath, Saurav and Kundu, Sandipan and Askell, Amanda and Kernion, Jackson and Jones, Andy and Chen, Anna and Goldie, Anna and Mirhoseini, Azalia and McKinnon, Cameron and others},
 journal = {arXiv preprint arXiv:2212.08073},
 title = {Constitutional ai: Harmlessness from ai feedback},
 year = {2022}
}

With bibfixer, missing authors are added and title is capitalized properly:

@article{bai2022constitutional,
  author = {Bai, Yuntao and Kadavath, Saurav and Kundu, Sandipan and Askell, Amanda and Kernion, Jackson and Jones, Andy and Chen, Anna and Goldie, Anna and Mirhoseini, Azalia and McKinnon, Cameron and Chen, Carol and Olsson, Catherine and Olah, Christopher and Hernandez, Danny and Drain, Dawn and Ganguli, Deep and Li, Dustin and Tran-Johnson, Eli and Perez, Ethan and Kerr, Jamie and Mueller, Jared and Ladish, Jeffrey and Landau, Joshua and Ndousse, Kamal and Lukosuite, Kamile and Lovitt, Liane and Sellitto, Michael and Elhage, Nelson and Schiefer, Nicholas and Mercado, Noemi and DasSarma, Nova and Lasenby, Robert and Larson, Robin and Ringer, Sam and Johnston, Scott and Kravec, Shauna and El Showk, Sheer and Fort, Stanislav and Lanham, Tamera and Telleen-Lawton, Timothy and Conerly, Tom and Henighan, Tom and Hume, Tristan and Bowman, Samuel R. and Hatfield-Dodds, Zac and Mann, Ben and Amodei, Dario and Joseph, Nicholas and McCandlish, Sam and Brown, Tom and Kaplan, Jared},
  title = {Constitutional {AI}: {H}armlessness from {AI} Feedback},
  journal = {arXiv preprint arXiv:2212.08073},
  year = {2022}
}

Example (2) Original bib entry from Google Scholar. This shows the arXiv version but the paper was published in ICML. "llm" needs to be capitalized.

@article{khan2024debating,
 author = {Khan, Akbir and Hughes, John and Valentine, Dan and Ruis, Laura and Sachan, Kshitij and Radhakrishnan, Ansh and Grefenstette, Edward and Bowman, Samuel R and Rockt{\"a}schel, Tim and Perez, Ethan},
 journal = {arXiv preprint arXiv:2402.06782},
 title = {Debating with more persuasive llms leads to more truthful answers},
 year = {2024}
}

With bibfixer, arXiv is replaced with the conference information and appropriate title:

@inproceedings{khan2024debating,
  author = {Khan, Akbir and Hughes, John and Valentine, Dan and Ruis, Laura and Sachan, Kshitij and Radhakrishnan, Ansh and Grefenstette, Edward and Bowman, Samuel R. and Rockt{\"a}schel, Tim and Perez, Ethan},
  title = {Debating with More Persuasive {LLMs} Leads to More Truthful Answers},
  booktitle = {Proceedings of the 41st International Conference on Machine Learning},
  year = {2024},
  volume = {235},
  pages = {23662--23733}
}

Example (3) Original bib entry from Google Scholar. Last author is missing due to a system issue of the distributor Penguin Random House. Subtitle and publisher needs to be capitalized appropriately.

@book{sugiyama2022machine,
 title = {Machine learning from weak supervision: An empirical risk minimization approach},
 author = {Sugiyama, Masashi and Bao, Han and Ishida, Takashi and Lu, Nan and Sakai, Tomoya},
 year = {2022},
 publisher = {MIT Press}
}

With bibfixer, we have all authors and appropriate capitalization:

@book{sugiyama2022machine,
  author = {Sugiyama, Masashi and Bao, Han and Ishida, Takashi and Lu, Nan and Sakai, Tomoya and Niu, Gang},
  title = {Machine Learning from Weak Supervision: {A}n Empirical Risk Minimization Approach},
  publisher = {{MIT} Press},
  year = {2022},
  pages = {320}
}

Installation

  1. Install (from PyPI):
pip install bibfixer
  1. Set up your API key:
# For OpenAI (default provider):
export OPENAI_API_KEY='your-api-key-here'

# For OpenRouter:
export OPENROUTER_API_KEY='your-api-key-here'

Usage

Basic usage (input is required via -i/--input):

bibfixer -i sample_input.bib

With output file:

bibfixer -i sample_input.bib -o corrected.bib

With additional formatting preferences (-p):

bibfixer -i sample_input.bib -p "Use NeurIPS instead of NIPS"

Use a custom prompt file (defaults to bundled prompts/default.md):

bibfixer -i sample_input.bib --prompt-file prompts/default.md

The complete revision instructions are in prompts/default.md. You can edit this file to match your style or point to another file using --prompt-file.

Use OpenRouter for other models. We use Exa.ai via the :online model suffix for web search capabilities.

# Use OpenRouter with the default model:
bibfixer -i sample_input.bib --provider openrouter

# Use a specific model:
bibfixer -i sample_input.bib --provider openrouter --model google/gemini-2.5-flash

Review

Since bibfixer is experimental (see warning above), it's a good idea to diff the results. To quickly compare input and output, you can run:

diff -y --suppress-common-lines input.bib output.bib | less -R

Streamlit app

In addition to the dependencies in pyproject.toml, install streamlit>=1.30.0.

From the repo root, run:

streamlit run app.py

Metadata

Release files for bibfixer 0.3.1

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

Source distribution (sdist)

Source distribution for bibfixer 0.3.1
File Size Uploaded Provenance
bibfixer-0.3.1.tar.gz 16.2 kB With provenance Details

Built distribution (wheel)

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

Total release size: 29.2 kB

Release files / bibfixer-0.3.1.tar.gz

Download URL bibfixer-0.3.1.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2ba66e2d70ef48efad38f0874bc72a4854702915c346c26c11648bdb660a7794
BLAKE2b-256 checksum
How to use checksums
fa30c5b9176f627430727ead82b8b0bcb9b1d6e6ce66d7213638384d88493a67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.

Transparency log

Release files / bibfixer-0.3.1-py3-none-any.whl

Download URL bibfixer-0.3.1-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5b5f8674d9d378e00259ac456975cb4a474713370ff6d513ab8e6418efe6e00
BLAKE2b-256 checksum
How to use checksums
3c42c30c93a2bb1dec984006ad92bd8d5c8c705ea77a313ee33f1f232d02bde0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.

Transparency log

Security for bibfixer 0.3.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bibfixer-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.

Transparency log

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.

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