refme
is a CLI tool that generates formatted citations (references) based on various unique identifiers, including URL, DOI, ISBN, PMID, and PMCID. Just pass in your identifiers, and refme
will handle the rest!
Install refme
globally via npm:
npm install -g refme
Or use it directly with npx
without global installation:
npx refme <list of identifiers>
To generate citations, provide a list of unique identifiers as arguments. refme
will attempt to identify the type of each identifier automatically.
--style
,-s <style>
: Choose the citation style for the output (e.g.,apa
,modern-language-association
,chicago-author-date
). The default is APA.--locale
,-l <locale>
: Set the locale for the citation language (e.g.,en-US
for U.S. English,fr-FR
for French,ar
for Arabic). The default isen-US
.
Note: You can check available citation styles and locales at:
# Using globally installed package
refme 10.1000/xyz123 978-3-16-148410-0
# Specifying a citation style and locale
refme --style modern-language-association --locale en-GB 10.1000/xyz123
Or with npx
:
npx refme --style chicago-author-date --locale fr-FR https://example.com/article
If refme
misinterprets an identifier’s type or if you want to force a specific type, you can prefix it with the type and a colon, like so:
refme "url: https://doi.org/10.xyz123" "isbn: 978-3-16-148410-0"
This will force refme
to treat the first identifier as a URL and the second as an ISBN. This works for all identifier types: url, doi, isbn, pmid, and pmcid.
- DOI: e.g.,
10.1093/ajae/aaq063
- URL: e.g.,
https://example.com
- ISBN: e.g.,
978-3-16-148410-0
- PMID: e.g.,
27097605
- PMCID: e.g.,
PMC6323133
refme
uses the following free APIs to retrieve citation data:
- CrossRef: For DOI-based data, e.g.,
https://api.crossref.org/works/<DOI>
- Open Library: For ISBN-based data, e.g.,
https://openlibrary.org/search.json?q=isbn:<ISBN>&mode=everything&fields=*,editions
- NCBI: For data from PubMed and PubMed Central, e.g.,
https://api.ncbi.nlm.nih.gov/lit/ctxp/v1/pubmed/?format=csl&id=<PMID>
andhttps://api.ncbi.nlm.nih.gov/lit/ctxp/v1/pmc/?format=csl&id=<PMCID>
These APIs provide open-access data for research and citation.
refme
generates a formatted citation (reference) for each identifier. The output is styled for easy copy-pasting into documents and includes all relevant citation details, formatted according to standard citation styles and locale settings.
This project is licensed under the MIT License. See the LICENSE file for details.
For inquiries or more information, you can reach out to us at [email protected].