cli

Solid

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.

Code & Development 379 stars 32 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 91/100

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

Skill Content

# CLI for R Packages ## When to Use What task: Display error with context and formatting use: `cli_abort()` with inline markup and bullet lists task: Show warning with formatting use: `cli_warn()` with inline markup task: Display informative message use: `cli_inform()` with inline markup task: Show progress for counted operations use: `cli_progress_bar()` with total count task: Show simple progress steps use: `cli_progress_step()` with status messages task: Format code or function names use: `{.code ...}` or `{.fn package::function}` task: Format file paths use: `{.file path/to/file}` task: Format package names use: `{.pkg packagename}` task: Format variable names use: `{.var variable_name}` task: Format values use: `{.val value}` task: Handle singular/plural text use: `{?s}` or `{?y/ies}` with pluralization task: Create headers use: `cli_h1()`, `cli_h2()`, `cli_h3()` task: Create alerts use: `cli_alert_success()`, `cli_alert_danger()`, `cli_alert_warning()`, `cli_alert_info()` task: Create lists use: `cli_ul()`, `cli_ol()`, `cli_dl()` with `cli_li()` ## Inline Markup Essentials Use inline markup with `{.class content}` syntax to format text: ```r # Basic formatting cli_text("Function {.fn mean} calculates averages") cli_text("Install package {.pkg dplyr}") cli_text("See file {.file ~/.Rprofile}") cli_text("{.var x} must be numeric, not {.obj_type_of {x}}") cli_text("Got value {.val {x}}") # Code formatting cli_text("Use {.code sum(x, na.rm = TRUE)}") # Pa...

Details

Author
posit-dev
Repository
posit-dev/skills
Created
6 months ago
Last Updated
3 days ago
Language
R
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Listed

cli-design

Use this skill when building command-line interfaces, designing CLI argument parsers, writing help text, adding interactive prompts, managing config files, or distributing CLI tools. Triggers on argument parsing, subcommands, flags, positional arguments, stdin/stdout piping, shell completions, interactive menus, dotfile configuration, and packaging CLIs as npm/pip/cargo/go binaries.

3 Updated today
Samuelca6399
Web & Frontend Solid

cli-design

Use this skill when building command-line interfaces, designing CLI argument parsers, writing help text, adding interactive prompts, managing config files, or distributing CLI tools. Triggers on argument parsing, subcommands, flags, positional arguments, stdin/stdout piping, shell completions, interactive menus, dotfile configuration, and packaging CLIs as npm/pip/cargo/go binaries.

167 Updated today
AbsolutelySkilled
Web & Frontend Listed

cli-design-expert

Expert CLI/TUI designer for building intuitive, user-friendly, and professional command-line interfaces. Focuses on UX patterns, help systems, progressive disclosure, and developer ergonomics.

335 Updated today
aiskillstore
Web & Frontend Listed

designing-clis

Use when building, improving, or reviewing command-line interfaces for better user experience - before implementing commands/output/errors, when users report confusion or frustration, or when CLI feels hard to use - provides UX principles, visual design techniques, and practical patterns for creating discoverable, delightful CLIs

10 Updated 2 days ago
technicalpickles
AI & Automation Solid

cli-logging-ux

Use this skill when editing or creating CLI output, logging, warnings, error messages, progress indicators, or diagnostic summaries in the APM codebase. Activate whenever code touches console helpers (_rich_success, _rich_warning, _rich_error, _rich_info, _rich_echo), DiagnosticCollector, STATUS_SYMBOLS, CommandLogger, or any user-facing terminal output — even if the user doesn't mention "logging" or "UX" explicitly.

2,714 Updated today
microsoft