Package 'bootstrapper'

Title: Opinionated R Package Quickstart
Description: Bootstrap new R packages with strongly opinionated defaults. Creates the package scaffold, wires up tests, README and NEWS, configures GitHub Actions and Dependabot, adds Air/Jarl setup, and drop in a default AGENTS.md for building R packages.
Authors: Visruth Srimath Kandali [aut, cre, cph] (ORCID: <https://orcid.org/0009-0005-9097-0688>)
Maintainer: Visruth Srimath Kandali <[email protected]>
License: GPL (>= 3)
Version: 1.1.0
Built: 2026-07-01 09:08:45 UTC
Source: https://github.com/VisruthSK/bootstrapper

Help Index


Bootstrap a New R Package

Description

Create a package with some opinionated setup.

Usage

bootstrapper(
  fields = getOption("usethis.description"),
  setup_gha = TRUE,
  setup_air = TRUE,
  setup_jarl = TRUE,
  setup_dependabot = TRUE,
  setup_AGENTS = FALSE,
  setup_precommit = TRUE,
  setup_touchstone = FALSE,
  setup_touchstone_plots = FALSE
)

Arguments

fields

Named list of DESCRIPTION fields passed to usethis::create_package(). See usethis::use_description()

setup_gha

Whether to configure GitHub Actions setup.

setup_air

Whether to configure Air formatting.

setup_jarl

Whether to configure Jarl linting.

setup_dependabot

Whether to write a Dependabot configuration.

setup_AGENTS

Whether to write a default AGENTS file.

setup_precommit

Whether to write a Bash pre-commit hook.

setup_touchstone

Whether to setup Touchstone benchmarking.

setup_touchstone_plots

Whether to use the Touchstone comment workflow that publishes benchmark plots to a separate branch. Only used when setup_touchstone = TRUE.

Value

Invisibly returns NULL.


Create a Package and Connect GitHub

Description

Create a package in root, prompts for a license, cleans up build ignore file. Essentially a slightly opinionated wrapper around usethis::create_package().

Usage

create_package(fields = getOption("usethis.description"))

Arguments

fields

Named list of DESCRIPTION fields passed to usethis::create_package(). See usethis::use_description()

Value

Invisibly returns NULL.


Opinionated Package Setup

Description

Run the package setup steps used by bootstrapper, including test infrastructure, README/NEWS creation, GitHub Actions, and linting defaults. Run this in the root directory of your package.

Usage

pkg_setup(
  setup_gha = TRUE,
  setup_dependabot = TRUE,
  setup_AGENTS = FALSE,
  setup_precommit = TRUE,
  setup_touchstone = FALSE,
  setup_touchstone_plots = FALSE,
  setup_air = TRUE,
  setup_jarl = TRUE
)

Arguments

setup_gha

Whether to configure GitHub Actions setup.

setup_dependabot

Whether to write a Dependabot configuration.

setup_AGENTS

Whether to write a default AGENTS file.

setup_precommit

Whether to write a Bash pre-commit hook.

setup_touchstone

Whether to setup Touchstone benchmarking.

setup_touchstone_plots

Whether to use the Touchstone comment workflow that publishes benchmark plots to a separate branch. Only used when setup_touchstone = TRUE.

setup_air

Whether to configure Air formatting.

setup_jarl

Whether to configure Jarl linting.

Value

Invisibly returns NULL.


Configure AGENTS Defaults

Description

Copies an opinionated, concise AGENTS.md for R package development.

Usage

setup_agents()

Value

Invisibly returns NULL.


Configure Dependabot Defaults

Description

Writes a default Dependabot configuration for GitHub Actions.

Usage

setup_dependabot()

Value

Invisibly returns NULL.


Configure Formatter Defaults

Description

Sets up Air and/or Jarl formatting defaults. Optionally format the repository once.

Usage

setup_formatter(air = TRUE, jarl = TRUE, format = TRUE, gha = TRUE)

Arguments

air

Whether to configure Air formatting.

jarl

Whether to configure Jarl linting.

format

Whether to format the repository after configuring tools.

gha

Whether to create the appropriate GHA for automatic formatting on PRs.

Value

Invisibly returns NULL.


Configure GitHub Actions Defaults

Description

Sets up standard GitHub Actions used by this package template and updates workflow references. DOES NOT setup formatting, that is owned by setup_formatter().

Usage

setup_gha()

Value

Invisibly returns NULL.


Configure Pre-Commit Hook

Description

Writes a Bash pre-commit hook that runs format and lint checks.

Usage

setup_precommit()

Value

Invisibly returns NULL.


Configure Touchstone

Description

Write a modified Touchstone GHA to benchmark PRs. You still need to write an appropriate script.R for the actual benchmarks. This version of the touchstone commenting GHA updates a single comment instead of making multiple. Optionally also adds the touchstone plots in a dropdown–these plots are stored on a new branch.

Usage

setup_touchstone(plots = FALSE)

Arguments

plots

Whether to use the workflow which writes touchstone plots (and needs more permissions).

Value

Invisibly returns NULL.


Choose and Apply a License

Description

Prompts for a license choice in interactive sessions and applies the selected usethis license helper.

Usage

use_license()

Value

Invisibly returns NULL.