{"id":13857437,"url":"https://github.com/r-lib/cliapp","last_synced_at":"2025-08-24T17:32:37.938Z","repository":{"id":56935995,"uuid":"148472820","full_name":"r-lib/cliapp","owner":"r-lib","description":"Rich Command Line Applications","archived":false,"fork":false,"pushed_at":"2024-04-25T07:57:26.000Z","size":383,"stargazers_count":61,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-08T23:45:31.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r-lib.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-12T11:56:25.000Z","updated_at":"2025-03-22T11:03:12.000Z","dependencies_parsed_at":"2024-11-09T21:08:19.690Z","dependency_job_id":"49ced4eb-d681-4f23-b8a1-7097aa02966c","html_url":"https://github.com/r-lib/cliapp","commit_stats":{"total_commits":70,"total_committers":2,"mean_commits":35.0,"dds":"0.014285714285714235","last_synced_commit":"a938b26b6dc444fd07ee3186854e4b4ccf2ce7e1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fcliapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fcliapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fcliapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-lib%2Fcliapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-lib","download_url":"https://codeload.github.com/r-lib/cliapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166474,"owners_count":21864467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T03:01:36.987Z","updated_at":"2025-05-08T23:45:38.754Z","avatar_url":"https://github.com/r-lib.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\ntitle: cliapp\noutput:\n  github_document:\n    toc: true\n    toc_depth: 3\n    includes:\n      before_body: header.md\n---\n\n```{r, setup, echo = FALSE, message = FALSE}\nknitr::opts_chunk$set(\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/\"\n)\n```\n\n## Superseded\n\nThis package is superseded, and we focus on the cli package now:\nhttps://github.com/r-lib/cli\n\n## Installation\n\nStable version:\n\n```{r eval = FALSE}\ninstall.packages(\"cliapp\")\n```\n\nDevelopment version:\n\n```{r eval = FALSE}\npak::pak(\"r-lib/cliapp\")\n```\n\n## Usage\n\nThis README uses the simple theme, included in the package, see\n`?simple_theme()`.\n\n```{r echo = FALSE, results = \"hide\"}\noptions(crayon.enabled = TRUE)\noptions(crayon.colors = 256)\ncrayon::num_colors(forget = TRUE)\noptions(cli.unicode = TRUE)\nlibrary(cliapp)\nstart_app(theme = simple_theme(), output = \"stdout\")\n```\n\n```r\nlibrary(cliapp)\nstart_app(theme = simple_theme())\n```\n\n### Headings\n\n`cli_h1()`, `cli_h2()` and `cli_h3()` create three levels of headings:\n\n```r\ncli_h1(\"Title\")\ncli_h2(\"Subtitle\")\ncli_h3(\"Subsubtitle\")\n```\n\n```{r headings, render=cliapp:::knit_print.html, echo = FALSE}\ncapture.output(cli_h1(\"Title\"))\ncapture.output(cli_h2(\"Subtitle\"))\ncapture.output(cli_h3(\"Subsubtitle\"))\n```\n\n### Text and inline markup\n\nAll (non-verbatim) outputted text runs through `glue::glue()`. In addition\nto glue interpolation, cliapp also supports inline markup via the\n`{markup text}` form. The builtin theme defines inline markup classes,\nsee `?inline-markup`.\n\n```r\ncli_text(\"{emph Emphasized text}, {strong Strong} importance.\n  A piece of code: {code  sum(a) / length(a)}. Package names:\n  {pkg cliapp}, file names: {path /usr/bin/env}, etc.\")\n```\n\n```{r inline-markup, render=cliapp:::knit_print.html, echo = FALSE}\ncapture.output(cli_text(\"{emph Emphasized text}, {strong Strong} importance.\n  A piece of code: {code  sum(a) / length(a)}. Package names:\n  {pkg cliapp}, file names : {path /usr/bin/env}, etc.\"))\n```\n\n### Alerts\n\n```r\ncli_alert(\"Generic alert\")\ncli_alert_danger(\"Something went horribly wrong\")\ncli_alert_warning(\"Better watch out!\")\ncli_alert_info(\"About to download 1.4GiB of data.\")\ncli_alert_success(\"All downloads finished successfully\")\n```\n\n```{r alerts, render=cliapp:::knit_print.html, echo = FALSE}\ncapture.output(cli_alert(\"Generic alert\"))\ncapture.output(cli_alert_danger(\"Something went horribly wrong\"))\ncapture.output(cli_alert_warning(\"Better watch out!\"))\ncapture.output(cli_alert_info(\"About to download 1.4GiB of data.\"))\ncapture.output(cli_alert_success(\"All downloads finished successfully\"))\n```\n\n### Lists\n\nOrdered, unordered and definition lists, they can be nested.\nSee `?cli_ol()`, `?cli_ul()`, `?cli_dl()` and `?cli_it()`.\n\n```r\ncli_div(theme = list(ol = list(\"margin-left\" = 2)))\ncli_ul(\"one\", .close = FALSE)\ncli_ol(c(\"foo\", \"bar\", \"foobar\"))\ncli_it(\"two\")\ncli_end()\ncli_end()\n```\n\n```{r lists, render=cliapp:::knit_print.html, echo = FALSE}\ncapture.output({\ncli_div(theme = list(ol = list(\"margin-left\" = 2)))\ncli_ul(\"one\", .close = FALSE)\ncli_ol(c(\"foo\", \"bar\", \"foobar\"))\ncli_it(\"two\")\ncli_end()\ncli_end()\n})\n```\n\n### Progress bars\n\nProgress bars are supported via the\n[progress package](https://github.com/r-lib/progress).\n\n## License\n\nMIT © RStudio\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Fcliapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-lib%2Fcliapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-lib%2Fcliapp/lists"}