- Notifications
You must be signed in to change notification settings - Fork3
Rich Command Line Applications
License
Unknown, MIT licenses found
Licenses found
r-lib/cliapp
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Create Rich Command Line Applications
Create rich command line applications, with colors, headings, lists, alerts,progress bars, etc. It uses CSS for theming.
This package is superseded, and we focus on the cli package now:https://github.com/r-lib/cli
Stable version:
install.packages("cliapp")Development version:
pak::pak("r-lib/cliapp")
This README uses the simple theme, included in the package, see?simple_theme().
library(cliapp)start_app(theme= simple_theme())
cli_h1(),cli_h2() andcli_h3() create three levels of headings:
cli_h1("Title")cli_h2("Subtitle")cli_h3("Subsubtitle")
All (non-verbatim) outputted text runs throughglue::glue(). Inaddition to glue interpolation, cliapp also supports inline markup viathe{markup text} form. The builtin theme defines inline markupclasses, see?inline-markup.
cli_text("{emph Emphasized text}, {strong Strong} importance. A piece of code: {code sum(a) / length(a)}. Package names: {pkg cliapp}, file names: {path /usr/bin/env}, etc.")
cli_alert("Generic alert")cli_alert_danger("Something went horribly wrong")cli_alert_warning("Better watch out!")cli_alert_info("About to download 1.4GiB of data.")cli_alert_success("All downloads finished successfully")
Ordered, unordered and definition lists, they can be nested. See?cli_ol(),?cli_ul(),?cli_dl() and?cli_it().
cli_div(theme=list(ol=list("margin-left"=2)))cli_ul("one",.close=FALSE)cli_ol(c("foo","bar","foobar"))cli_it("two")cli_end()cli_end()
Progress bars are supported via theprogresspackage.
MIT © RStudio
About
Rich Command Line Applications
Resources
License
Unknown, MIT licenses found
Licenses found
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.









