Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

CITATION Guide

This guide accompanies our CITATION.cff template. Please refer to these instructions for using the template.

When people build on your software in their own research, you want them to be able to cite it easily, consistently, and in a way that credits everyone who contributed. A CITATION.cff file is the simplest way to make that happen. It’s a small, human- and machine-readable file (written in YAML) that lives in the root of your repository and spells out exactly how you’d like your work cited. The format has a friendly canonical home at citation-file-format.github.io, which is the best place to go for the full picture.

Using this file has a couple of benefits:

Creating your file

The easiest way—and the one we recommend—is cffinit, the web form linked from the site above. It walks you through the fields, builds a valid CITATION.cff for you, and makes it really hard to end up with a broken file.

Would you rather write it by hand? Our CITATION.cff template gives you a working starting point with TODO markers for the parts you fill in. Either way, the field reference below explains what everything means.

The essentials

Four fields are required, and here’s what each one is for:

Worth adding

These ones aren’t required, but they make your citation far more useful:

Citing a paper instead of the software

Sometimes there’s a journal article you’d rather people cite than the software itself. The preferred-citation block lets you describe that paper, and citation-aware tools will point people to it while still recognizing the software. The template includes a preferred-citation example you can fill in or delete.

Before you commit

If you built your file with cffinit, it’s already valid. If you edited the template by hand, give it a quick check—cffconvert --validate validates from the command line if you’re using cffconvert, or you can paste the file into cffinit. A CITATION.cff with a typo will silently break the tools that read it, so it’s worth the 30 seconds to validate!

For the full specification and more advanced options (datasets, conference papers, multiple identifiers, and more), see the Citation File Format documentation.