Updated Oct 19, 2026

Utilities

Format and deduplicate a BibTeX file

bibtex-format is an offline BibTeX formatter with DOI and citation-key deduplication.

Agent

overview

What bibtex-format does

Clean, normalize and deduplicate a BibTeX file with K-Dense's citation-management formatter (canonical field order and alignment, page-range fixes, DOI duplicate removal, optional sort and citation-key rewrite). Offline.

Normalize field order, align equals signs and convert page ranges such as 10-20 to 10--20. Duplicate entries are removed by case-insensitive DOI or identical citation key. Different keys without matching DOIs are retained even when their titles match.

The input limit is 16 MiB. Optional sort accepts key, year, author or title. Rekey defaults to false; enabling it changes citation keys before deduplication and can break existing document citations. Input with no parseable entries fails without output.

Packaged version: 065b734. Upstream license: MIT.

source github.com/k-dense-ai/scientific-agent-skills/tree/065b734670d7d990627dbc06a05b5a99be33f1f1/skills/citation-management

use cases

Where bibtex-format fits

Normalize bibliography layout

Align fields and normalize page ranges in a local BibTeX file.

Remove DOI duplicates

Collapse entries sharing a DOI even when DOI letter case differs.

Sort entries for review

Choose year, author, title or citation-key ordering.

reference

bibtex-format inputs and flags

3 inputs
NameTypeFlagDescription
inputFILE--inputBibTeX file, maximum 16 MiB.
sortSTRING--sortOptional sort field - key, year, author or title.
rekeySTRING--rekeytrue to rewrite citation keys to the AuthorYearWord scheme before deduplicating (default false).

Showing key inputs. bibtex-format exposes 3 inputs in total.

example

Run bibtex-format

bibtex-format · command
python3 /app/run.py --input ./input.txt --sort year ./output

guidance

Choosing bibtex-format

Use bibtex-format to clean a local bibliography. It does not search for papers, resolve DOIs, verify references or establish that two differently keyed entries describe the same work.

faq

bibtex-format questions

input: BibTeX file, maximum 16 MiB. sort: Optional sort field - key, year, author or title. rekey: true to rewrite citation keys to the AuthorYearWord scheme before deduplicating (default false).

Normalize field order, align equals signs and convert page ranges such as 10-20 to 10--20. Duplicate entries are removed by case-insensitive DOI or identical citation key. Different keys without matching DOIs are retained even when their titles match.

The input limit is 16 MiB. Optional sort accepts key, year, author or title. Rekey defaults to false; enabling it changes citation keys before deduplication and can break existing document citations. Input with no parseable entries fails without output.

Use bibtex-format to clean a local bibliography. It does not search for papers, resolve DOIs, verify references or establish that two differently keyed entries describe the same work.

The public image repository gives immutable image and ORAS download commands, the expected source/notices bundle checksum and pinned upstream source directions. The accompanying OCI bundle retains the original build recipe, runtime sources and full installed notices. The Git recipe keeps primary notices and an exact layer/hash index; it does not duplicate the full installed notice tree or mirror every upstream source archive. Image, source and license notice downloads.

Run bibtex-format yourself

The saved synthetic verifier confirmed sorted keys lee2018 and smith2020, removal of a case-variant DOI duplicate and normalization of a page range. The complete formatted bibliography was not retained. The command shows the container entrypoint with example paths.

Facts on this page come from the live Trickest tool library.