This command helps interacting with BibTeX bib files in your LaTeX projects.


You can use it for opening some papers by calling:

papis bibtex read new_papers.bib open

or to add papers to the BibTeX file by calling:

papis bibtex             \
    read new_papers.bib  \ # Read bib file
    add -q einstein      \ # Pick a doc with query 'einstein' from library
    add -q heisenberg    \ # Pick a doc with query 'heisenberg' from library
    save new_papers.bib    # Save in new_papers.bib

or to update some information that was modified in papis’ YAML files by calling:

papis bibtex            \
    read new_papers.bib \ # Read bib file
    update -f           \ # Update what has been read from papis library
    save new_papers.bib   # save everything to new_papers.bib, overwriting

Local configuration file

If you are working in a local folder where you have a bib file called main.bib, you can avoid adding the repetitive read main.bib and save main.bib by using the configuration values described in the documentation. You can create a local configuration file .papis.config for papis bibtex to read and write automatically. This file should contain:

default-read-bibfile = main.bib
default-save-bibfile = main.bib
auto-read = True

With this setup, you can just do:

papis bibtex add -q einstein save

Check references quality

When you’re collaborating with someone, you might come across malformed or incomplete references. Most journals want to have all the DOIs and URLs available. For this you can use the doctor command:

papis bibtex read mybib.bib doctor

Usually, you likely want to only have the references that are actually cited in the LaTeX file in your project’s BibTeX file. You can check which references are not cited in the .tex files by calling:

papis bibtex iscited -f main.tex -f chapter-2.tex

and you can then filter them out using the filter-cited command.

To monitor the health of the project’s BibTeX file, you can add a simple target to the project’s Makefile like

    papis bibtex iscited -f main.tex doctor
.PHONY: check-bib

Vim integration

This command can also be easily used from vim with these simple lines

function! PapisBibtexRef()
    let l:temp = tempname()
    echom l:temp
    silent exec "!papis bibtex ref -o ".l:temp
    let l:olda = @a
    let @a = join(readfile(l:temp), ',')
    normal! "ap
    let @a = l:olda

command! -nargs=0 BibRef call PapisBibtexRef()
command! -nargs=0 BibOpen exec "!papis bibtex open"

And use like such: asciicast

Command-line Interface

A papis script to interact with bibtex files

papis bibtex [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...


-h, --help

Show this message and exit.

--noar, --no-auto-read

Do not auto read even if the configuration file says it



Add a reference to the BibTeX file.


Import documents from a BibTeX file.


Browse a document in the document list.


Check BibTeX file for correctness.


Edit documents by adding keys or opening…


Filter cited documents from the BibTeX file.


Import documents from a BibTeX file to the…


Check which documents are not cited.


Open a document using the default…


Print the reference for a document.


Remove a document from the documents list.


Save the documents in the BibTeX format.


Sort the documents in the BibTeX file.


Remove duplicate BibTeX entries.


Update documents from and to the library.