r-cli-app

Solid

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 396 stars 34 forks Updated today MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
87
Recency 20%
100
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
6 months ago
Last Updated
today
Language
R
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Solid

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.

396 Updated today
posit-dev
Data & Documents Listed

kappmaker

KAppMaker CLI - automate mobile app bootstrapping, AI logo/screenshot generation, App Store Connect setup, Google Play Console setup, Adapty subscriptions, image tools, Android builds, store publishing, package refactoring, and version bumping. Use when the user wants to create a mobile app, generate logos, screenshots, translate screenshots, set up App Store Connect, configure Google Play Console (listings, subscriptions, IAPs, data safety), configure Adapty, add a new subscription or credit-pack IAP to an existing app, process images, convert images to WebP, build Android releases, generate keystores, publish to Play Store or App Store, refactor package names, or bump versions.

3 Updated 2 weeks ago
KAppMaker
AI & Automation Solid

cli-developer

Use when building CLI tools, implementing argument parsing, or adding interactive prompts. Invoke for parsing flags and subcommands, displaying progress bars and spinners, generating bash/zsh/fish completion scripts, CLI design, shell completions, and cross-platform terminal applications using commander, click, typer, or cobra.

9,846 Updated 3 weeks ago
Jeffallan