rpkg-0.1.0 is not a library.
rpkg
rpkg (R Package) is a lightweight CLI wrapper around Rscript written in Rust that simplifies installing R packages through terminal commands.
Features
- Install single or multiple packages in one command
- Default CRAN mirror set to
https://cloud.r-project.org/ - Optionally select CRAN mirrors by country with fuzzy matching
- Interactive numbered repository selection when there are multiple country matches
- Non-interactive auto-selection of the best match when requested
- Install from explicit git source flags (Github, Gitlab, Codeberg, Bitbucket)
- Optionally install to a library path with
-l/--library
Prerequisites
- Rust toolchain (e.g., via rustup)
- R with
Rscriptavailable on yourPATH
Installation
Usage
rpkg [OPTIONS] <PACKAGE> [<PACKAGE> ...]
Examples:
# Install a single package from CRAN
# Install multiple CRAN packages at once
# Select a CRAN mirror by country (fuzzy matched), then select one between matches
# Select by country but auto-pick best match without prompting
[!IMPORTANT] Mirror resolution precedence
- If
--countryis set,rpkgretrieves CRAN mirrors through R and asks for selection when needed.- Else
rpkgfalls back tohttps://cloud.r-project.org/.
# Install from GitHub source flag
# Mix multiple explicit git sources in one command (no flag means CRAN)
# Install into a specific library path
[!IMPORTANT] Git source behavior
- Positional packages are always installed from CRAN.
- Git installs happen only through explicit source flags (
--github,--gitlab,--bitbucket,--codeberg).- Source flag values must be in
OWNER/REPOformat.- Each source flag can be repeated to install multiple repositories.
Options:
-c, --country <COUNTRY> Country query used for CRAN mirror fuzzy matching
--non-interactive Auto-select best mirror when multiple matches are found
-l, --library <LIBRARY> Path to install package library (optional)
--github <OWNER/REPO> Install from GitHub (repeatable)
--gitlab <OWNER/REPO> Install from GitLab (repeatable)
--bitbucket <OWNER/REPO> Install from Bitbucket (repeatable)
--codeberg <OWNER/REPO> Install from Codeberg (repeatable)
-h, --help Print help information
-V, --version Print version information
Uninstall
If installed via Cargo:
Contributing
Contributions, issues, and feature requests are welcome! Feel free to open a PR or issue.
License
This project is licensed under the MIT License. See LICENSE for details.