Skip to content

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, PyPI, and Bioconductor 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.


Users must be a member of the rstudio-pm group in order to use the RStudio Package Manager CLI. See the Changing RunAs User section 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.


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'

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.


The CLI can generate an autocompletion script for Bash. This can help you work with the CLI more efficiently, using your autocomplete key (often TAB) to both complete commands and bring up options. Once installed, the autocompletion works for rspm subcommands and for flags to each command. To show instructions for how to install the autocompletion, run rspm completion --help.

Example output from the autocompletion script:


$ rspm url (push tab key twice)
create   explain

$ rspm (push tab key twice)
add          cluster      create       encrypt      hup          list         online       rerun        sync         url          
archive      completion   delete       evict        import       logs         remove       run          unsubscribe  
clear        config       edit         help         info         offline      reorder      subscribe    update       

$ rspm create (push tab key twice)
git-builder  repo         source       

$ rspm create source --(push tab key twice)
--config          --name            --output-format   --snapshot        --type            --verbose         --version=        
--config=         --name=           --output-format=  --snapshot=       --type=           --version 


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