Skip to content

rv configure repository add

Adds a new repository to the repositories section of the config file.

rv configure repository add <ALIAS> --url <URL> [OPTIONS]
  • ALIAS - The repository alias to add
  • --url <URL> - The url of the repository to add

  • --force-source - Enable force_source for this repository

  • --first - Add as first repository entry

  • --last - Add as last repository entry

    Default: --last

  • --before <alias> - Add before the specified alias

  • --after <alias> - Add after the specified alias

All examples on this page will start with the following configuration:

rproject.toml
[project]
name = "configure"
repositories = [
{ alias = "CRAN", url = "https://cran.r-project.org" },
{ alias = "PPM", url = "https://packagemanager.posit.co/cran/2025-01-01" },
]
Terminal window
rv configure repository add "bioconductor" --url "https://bioconductor.org/packages/3.18/bioc"
OR
rv configure repository add "bioconductor" --url "https://bioconductor.org/packages/3.18/bioc" --last
rproject.toml
[project]
name = "configure"
repositories = [
{ alias = "CRAN", url = "https://cran.r-project.org" },
{ alias = "PPM", url = "https://packagemanager.posit.co/cran/2025-01-01" },
{ alias = "bioconductor", url = "https://bioconductor.org/packages/3.18/bioc" },
]

Add a Repository with force_source as the Middle Repository

Section titled “Add a Repository with force_source as the Middle Repository”
Terminal window
rv configure repository add "bioconductor" --url "https://bioconductor.org/packages/3.18/bioc" --force-source --after CRAN
OR
rv configure repository add "bioconductor" --url "https://bioconductor.org/packages/3.18/bioc" --force-source --before PPM
rproject.toml
[project]
name = "configure"
repositories = [
{ alias = "CRAN", url = "https://cran.r-project.org" },
{ alias = "bioconductor", url = "https://bioconductor.org/packages/3.18/bioc", force_source = true },
{ alias = "PPM", url = "https://packagemanager.posit.co/cran/2025-01-01" },
]