r-cli-app

Featured

Build command-line apps in R using the Rapp package. Use when creating a CLI tool in R, adding argument parsing to an R script, turning an R script into a command-line app, shipping CLIs in an R package, or using Rapp (the alternative Rscript front-end). Also use for shebang scripts, exec/ directory in R packages, or subcommand-based R tools.

Web & Frontend 522 stars 53 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 90/100

Stars 20%
91
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Building CLI Apps with Rapp Rapp (v0.3.0) is an R package that provides a drop-in replacement for `Rscript` that automatically parses command-line arguments into R values. It turns simple R scripts into polished CLI apps with argument parsing, help text, and subcommand support — with zero boilerplate. **R ≥ 4.1.0** | **CRAN:** `install.packages("Rapp")` | **GitHub:** `r-lib/Rapp` After installing, put the `Rapp` launcher on PATH: ```r Rapp::install_pkg_cli_apps("Rapp") ``` This places the `Rapp` executable in `~/.local/bin` (macOS/Linux) or `%LOCALAPPDATA%\Programs\R\Rapp\bin` (Windows). --- ## Core Concept: Scripts Are the Spec Rapp scans **top-level expressions** of an R script and converts specific patterns into CLI constructs. This means: 1. The same script works identically via `source()` and as a CLI tool. 2. You write normal R code — Rapp infers the CLI from what you write. 3. Default values in your R code become the CLI defaults. Only top-level assignments are recognized. Assignments inside functions, loops, or conditionals are not parsed as CLI arguments. --- ## Pattern Recognition: R → CLI Mapping This table is the heart of Rapp — each R pattern automatically maps to a CLI surface: | R Top-Level Expression | CLI Surface | Notes | |---|---|---| | `foo <- "text"` | `--foo <value>` | String option | | `foo <- 1L` | `--foo <int>` | Integer option | | `foo <- 3.14` | `--foo <float>` | Float option | | `foo <- TRUE` / `FALSE` | `--foo` / `--no-foo` | Boole...

Details

Author
posit-dev
Repository
posit-dev/skills
Created
10 months ago
Last Updated
1 weeks ago
Language
R
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

app

Smart router for app projects. Auto-detects what to do based on context — new app / analyze existing / continue work / UI redesign / pre-release. One command, AI figures out next…

1 Updated 3 weeks ago
Nioris
Code & Development Featured

cli

Comprehensive R package for command-line interface styling, semantic messaging, and user communication. Use this skill when working with R code that needs to: (1) Format console output with inline markup and colors, (2) Display errors, warnings, or messages with cli_abort/cli_warn/cli_inform, (3) Show progress indicators for long-running operations, (4) Create semantic CLI elements (headers, lists, alerts, code blocks), (5) Apply themes and customize output styling, (6) Handle pluralization in user-facing text, (7) Work with ANSI strings, hyperlinks, or custom containers. Also use when migrating from base R message/warning/stop, debugging cli code, or improving existing cli usage.

522 Updated 1 weeks ago
posit-dev
Testing & QA Listed

rigsmith-tools

Use the rigsmith CLI family — rig (convention-first dev launcher: build/test/run/ format/lint/typecheck/coverage/kill/worktree across .NET, Node, Go, Rust), changerig (changesets), shiprig (releases/publish), and clauderig (sync Claude Code config across machines + worktree/PR guard). Invoke whenever the work involves building/testing/running/formatting a project, managing changesets or changelogs, cutting or publishing a release, creating worktrees/branches, syncing Claude Code setup, finding or reopening a past Claude Code session, or working across several forked repos fused into one history (`rig stack`) — even if the user names a raw tool (go/dotnet/npm/cargo) instead of rig.

1 Updated today
rigsmith