13 Admin CLI

RStudio Package Manager is administered through a command-line interface (CLI). Administrators can use the CLI to create repositories and sources, add local packages to sources, and setup sync schedules for CRAN sources.

The CLI is installed at /opt/rstudio-pm/bin/rspm. The CLI uses the configuration defined in /etc/rstudio-pm/rstudio-pm.gcfg unless you specify an alternate configuration file with the --config flag.

13.1 Privileges

Users must be a member of the rstudio-pm group in order to use the RStudio Package Manager CLI. See C for instructions on changing the required group.

The RStudio Package Manager CLI uses a Unix domain socket for communicating with the RStudio Package Manager server. By default, the domain socket file is located at /var/run/rstudio-pm/rstudio-pm.sock. You can customize the location by configuring the Server.SockFileDir setting.

Any user invoking the RStudio Package Manager CLI must have read/write access to the Unix domain socket in order to communicate with the RStudio Package Manager server.

13.2 Location

The CLI is located at /opt/rstudio-pm/bin/rspm. We recommend that users make an alias, add this location to their PATH, or navigate to this directory if they will be running multiple commands in one session, for example:

alias rspm='/opt/rstudio-pm/bin/rspm'

13.3 Getting Help

Simply run rspm without any arguments to display the top-level help for the RStudio Package Manager CLI. For help with a specific command, you can use the help command. For example, to display help about the create command, you can use rspm help create.

13.4 Examples

For examples using the CLI, please refer to the Configuration guide.