These helpers produce the markdown text you need in your README to include badges that report information, such as the CRAN version or test coverage, and link out to relevant external resources. To add badges automatically ensure your badge block starts with a line containing only <!-- badges: start --> and ends with a line containing only <!-- badges: end -->.

use_badge(badge_name, href, src)




use_binder_badge(ref = git_branch_default(), urlpath = NULL)



Badge name. Used in error message and alt text

href, src

Badge link and image src


Stage of the package lifecycle


A Git branch, tag, or SHA


An optional urlpath component to add to the link, e.g. "rstudio" to open an RStudio IDE instead of a Jupyter notebook. See the binder documentation for additional examples.


  • use_badge(): a general helper used in all badge functions

  • use_bioc_badge(): badge indicates BioConductor build status

  • use_cran_badge(): badge indicates what version of your package is available on CRAN, powered by

  • use_lifecycle_badge(): badge declares the developmental stage of a package (or argument or function) according to

    • Experimental

    • Maturing

    • Stable

    • Questioning

    • Superseded

    • Soft-deprecated (function or argument)

    • Deprecated (function or argument)

    • Defunct (function or argument)

  • use_binder_badge(): badge indicates that your repository can be launched in an executable environment on

See also

Functions that configure continuous integration, such as use_github_actions(), also create badges.


if (FALSE) { use_cran_badge() use_lifecycle_badge("stable") }