Overview 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.
Create, initialize, or migrate a project.
rv init- Initialize a new or existing project with the necessary project infrastructure.rv migrate renv- Initialize an existingrenvproject by migrating therenv.lockto anrvconfig file.
Sync the project library to the config and lock files.
rv sync- The basic command to install packagesrv upgrade- Install packages while ignoring the lockfile
Edit the config file without opening it directly.
rv add- Quickly add packages to the config file and syncrv remove- Quickly remove packages from the config file and syncrv configure repository- Configure the repositories section of the config file
See what will happen before it happens.
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.
Inspect information about the project.
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 (Ubuntu, Debian, RHEL-family, and openSUSE/SLE only)
A few other commands which can be used to control your project:
rv fmt- Format the configuration file to ensure consistent styling, while maintaining spacing and commentsrv activate- Activate a previously initialized rv projectrv deactivate- Deactivate an rv projectrv run- Run an Rscript command with the project library configured, syncing first by defaultrv export renv- Export the project’s lock file torenv.lockformat
Options
Section titled “Options”Each command has the following global options:
--config-file- the path to a config file. Defaults torproject.tomlin 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--verboseand--quietflag and not log anything.--emit-events- stream progress as NDJSON to stdout instead of normal output, suppressing everything else. Intended for IDE/GUI integrations drivingrvprogrammatically rather than interactive use. Conflicts with--json. Introduced in rv v0.22.0