r-lib-cli

Format R CLI messages, progress, and structure with cli inline markup.

1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/nq-rdl/agent-extensions --skill r-lib-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r-lib-cli
Source: https://github.com/nq-rdl/agent-extensions/tree/main/skills/r-lib-cli
Command: npx skills add https://github.com/nq-rdl/agent-extensions --skill r-lib-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

R developers often need to present clear, nicely formatted command-line outputs when building R packages or scripts, but R's default messaging lacks rich formatting and structure.

Core Features & Use Cases

  • Inline markup with class-based formatting (e.g., {.code ...}, {.pkg ...}, {.val ...}) for code, paths, and values.
  • Formatted errors, warnings, and information via cli_abort(), cli_warn(), cli_inform() for consistent UX.
  • Progress indicators and headings (cli_progress_bar, cli_h1, cli_ul) to communicate status.
  • Theming and styling via cli_div and built-in themes to ensure accessible, branded CLI output.
  • Real-world use cases: building robust CRAN-like CLIs, debugging workflows, and user-facing messages in packages.

Quick Start

Install and load the cli package, then start formatting outputs in your R scripts with inline markup and CLI helpers.

Frequently Asked Questions about r-lib-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I format console output in R scripts with semantic markup?

Format console output in R by applying inline markup classes like {.code ...} or {.val ...} to structurally distinguish code snippets, file paths, and values within terminal messages.

What is the best way to create consistent error messages in R packages?

Create consistent error messages in R packages by using cli_abort() for semantic, formatted errors and cli_warn() or cli_inform() for structured warnings and informational outputs.

How do I add progress bars to R command-line applications?

Add progress bars to R command-line applications by implementing cli_progress_bar, which provides visually distinct and accessible progress indicators for long-running scripts.

Can I apply custom theming to terminal interfaces in R?

Apply custom theming to terminal interfaces in R by utilizing cli_div and built-in themes to ensure accessible, branded CLI output with container-based structural formatting.

Does the cli R package support structured headings and lists?

The cli R package supports structured terminal formatting by providing cli_h1 for hierarchical headings and cli_ul for unordered lists to organize command-line output visually.

Why use inline markup classes instead of base R messaging functions?

Use inline markup classes instead of base R messaging functions to automatically format text, ensure consistent UX across packages, and produce accessible, structured CLI output.