BibTeX Library Management
Maintain BibTeX/biblatex libraries (.bib files) from the command line using jabkit, JabRef's CLI toolkit.
Setup
jabkit runs via JBang — no JDK setup needed. Install JBang if missing:
curl -Ls https://sh.jbang.dev | bash -s - app setup # Linux/macOS
iex "& { $(iwr -useb https://ps.jbang.dev) } app setup" # Windows
Then install jabkit on the PATH (the same command also updates it):
jbang app install --fresh --force jabkit@jabref
Global flags (place before the subcommand): -p/--porcelain for script-friendly output, -d/--debug for verbose logging.
Validate a library
Run both consistency and integrity checks:
jabkit check library.bib
Or individually:
jabkit check consistency library.bib --output-format txt
jabkit check integrity library.bib --output-format txt
--output-format accepts csv, errorformat (default; machine-readable, suitable for editors), github-actions, or txt. Exit code signals whether problems were found — use it in CI.
Generate citation keys
jabkit citationkeys generate library.bib --output library.bib
Useful options:
--pattern "[auth][year]"— override the citation key pattern--avoid-overwrite— keep existing keys--suffix SECOND_WITH_A— duplicate-key suffix strategy (ALWAYS,SECOND_WITH_A,SECOND_WITH_B)--transliterate— transliterate non-Latin fields before key generation
Search a library
jabkit search --query "author=smith" --input library.bib --output results.bib
The query uses JabRef's search syntax (field=value pairs, boolean operators). Default output format is bibtex.
Convert between formats
jabkit convert --input library.bib --output library.html --output-format html
--output-format defaults to bibtex. Use --input-format "*" to auto-detect the input. Apply field formatters during conversion with --field-formatters.
Pseudonymize before sharing
Replace identifying data for bug reports or datasets; writes a key file for de-pseudonymization:
jabkit pseudonymize library.bib --output library.pseudo.bib --key library.pseudo.keys.csv
Look up references
jabkit doi-to-bibtex 10.1145/3149935.3149942 # DOI → BibTeX entry
jabkit fetch --provider ArXiv --query "quantum computing" --output results.bib
jabkit get-cited-works 10.1145/3149935.3149942 # bibliography of a work
jabkit get-citing-works 10.1145/3149935.3149942 # works citing it
Related
- Extracting entries from PDF papers: the
pdf-to-bibtexskill in this repository. - Full CLI reference: the
jabkitskill in this repository.