Introduction and Global Options
rv
aims to provide users with commands that make package management and installation simple. To accomplish this,
we have various “types” of commands which give users the ability to set up and configure their projects, install packages, and
inspect their project status and other information.
Project Creation
Section titled “Project Creation”rv
is able to create new projects, initialize an existing project, and even migrate an existing renv
project.
All of which will set users up with a project that is immediately ready to install packages into isolated, project-specific libraries.
Commands
Section titled “Commands”rv init
- Initialize a new or existing project with the necessary project infrastructure.rv migrate renv
- Initialize an existingrenv
project by migrating therenv.lock
to anrv
config file.
Package installation
Section titled “Package installation”In other R tools, individual packages are installed and removed through separate commands (i.e. install.packages()
and remove.packages()
)
In rv
, a project is synchronized across the config file, lock file, and the project library, performing whatever actions,
including installation and removal of packages and dependencies, is necessary to reach the synchronized state.
Every time a package is changed - added, removed, new version, source changed - the lockfile is automatically updated to reflect the new state of the project library.
Commands
Section titled “Commands”rv sync
- The basic command to install packagesrv upgrade
- Install packages while ignoring the lockfile
Project Configuration
Section titled “Project Configuration”As mentioned in the Configuration File section, rv
uses a configuration file to
provide users a way to declare the desired state of the project. While this configuration file was designed and
intended to be manually edited, rv
allows you to add simple dependencies to the config file.
Commands
Section titled “Commands”rv add
- Quickly add packages to the config file and syncrv configure repository
- Configure the repositories section of the config file
Project Status
Section titled “Project Status”In other R tools, packages are installed and any consequence is up to the user to reconcile. With rv
, users have the
ability to see what will happen before it occurs, giving power to the users to reconcile any potential issues without
changing your current project. This concept persists across other commands, like add
and upgrade
,
with the --dry-run
flag, but two commands to specifically indicate the status of the project, displaying the information
differently depending on your needs.
Commands
Section titled “Commands”rv plan
- Show the results if you were to runrv sync
. A more granular view.rv summary
- Inspect your project on a global level, indicating information like how packages need to be installed and the source of packages.
Project Information
Section titled “Project Information”In addition to the project’s status, rv
provides commands to see information regarding the project.
Commands
Section titled “Commands”rv tree
- Show the dependency tree for the project’s dependenciesrv cache
- Returns the cache directories used in the projectrv library
- Returns the relative path to the library in UNIX-formatrv info
- Returns simple information about the project. Primarily used for project activationrv sysdeps
- List the system dependencies needed by the dependency tree (only for Ubuntu/Debian)
Others
Section titled “Others”A few other commands which can be used occasionally to effect your project:
Commands
Section titled “Commands”rv activate
- Activate a previously initialized rv projectrv deactivate
- Deactivate an rv project
Options
Section titled “Options”Each command has the following global options:
--config-file
- the path to a config file. Defaults torproject.toml
in the current directory. Unless otherwise specified in the config file, the library will be synced at the level of the config file, not in the working directory.--verbose
(-v
) - increase the logging verbosity--quiet
(-q
) - decrease logging verbosity--json
- print the output as JSON format. This will ignore the--verbose
and--quiet
flag and not log anything.