Package: cli 3.6.3.9000

Gábor Csárdi

cli: Helpers for Developing Command Line Interfaces

A suite of tools to build attractive command line interfaces ('CLIs'), from semantic elements: headings, lists, alerts, paragraphs, etc. Supports custom themes via a 'CSS'-like language. It also contains a number of lower level 'CLI' elements: rules, boxes, trees, and 'Unicode' symbols with 'ASCII' alternatives. It support ANSI colors and text styles as well.

Authors:Gábor Csárdi [aut, cre], Hadley Wickham [ctb], Kirill Müller [ctb], Salim Brüggemann [ctb], Posit Software, PBC [cph, fnd]

cli_3.6.3.9000.tar.gz
cli_3.6.3.9000.zip(r-4.5)cli_3.6.3.9000.zip(r-4.4)cli_3.6.3.9000.zip(r-4.3)
cli_3.6.3.9000.tgz(r-4.4-arm64)cli_3.6.3.9000.tgz(r-4.4-x86_64)cli_3.6.3.9000.tgz(r-4.3-arm64)cli_3.6.3.9000.tgz(r-4.3-x86_64)
cli_3.6.3.9000.tar.gz(r-4.5-noble)cli_3.6.3.9000.tar.gz(r-4.4-noble)
cli_3.6.3.9000.tgz(r-4.4-emscripten)cli_3.6.3.9000.tgz(r-4.3-emscripten)
cli.pdf |cli.html
cli/json (API)
NEWS

# Install cli in R:
install.packages('cli', repos = c('https://r-lib.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/r-lib/cli/issues

On CRAN:

cli

232 exports 621 stars 21.29 score 0 dependencies 13324 dependents 8 mentions 1.4M downloads

Last updated 10 days agofrom:d9febb5860

Exports:__cli_update_dueansi_alignansi_chartransi_collapseansi_columnsansi_grepansi_greplansi_has_anyansi_has_hyperlink_supportansi_hide_cursoransi_htmlansi_html_styleansi_hyperlink_typesansi_ncharansi_nzcharansi_palette_showansi_palettesansi_regexansi_show_cursoransi_simplifyansi_stringansi_stripansi_strsplitansi_strtrimansi_strwrapansi_substransi_substringansi_toloweransi_toupperansi_trimwsansi_with_hidden_cursorbg_blackbg_bluebg_br_blackbg_br_bluebg_br_cyanbg_br_greenbg_br_magentabg_br_redbg_br_whitebg_br_yellowbg_cyanbg_greenbg_magentabg_nonebg_redbg_whitebg_yellowboxxbuiltin_themecat_boxxcat_bulletcat_linecat_printcat_ruleccli_tick_resetclicli_abortcli_alertcli_alert_dangercli_alert_infocli_alert_successcli_alert_warningcli_blockquotecli_bulletscli_bullets_rawcli_codecli_divcli_dlcli_endcli_fmtcli_formatcli_format_methodcli_h1cli_h2cli_h3cli_informcli_licli_list_themescli_olcli_output_connectioncli_parcli_process_donecli_process_failedcli_process_startcli_progress_alongcli_progress_barcli_progress_builtin_handlerscli_progress_cleanupcli_progress_democli_progress_donecli_progress_messagecli_progress_numcli_progress_outputcli_progress_stepcli_progress_stylescli_progress_updatecli_rulecli_sitrepcli_statuscli_status_clearcli_status_updatecli_textcli_tick_resetcli_ulcli_veccli_verbatimcli_warncode_highlightcode_theme_listcol_blackcol_bluecol_br_blackcol_br_bluecol_br_cyancol_br_greencol_br_magentacol_br_redcol_br_whitecol_br_yellowcol_cyancol_greencol_greycol_magentacol_nonecol_redcol_silvercol_whitecol_yellowcombine_ansi_stylesconsole_widthdefault_appdemo_spinnersdiff_chrdiff_strformat_bullets_rawformat_errorformat_inlineformat_messageformat_warningget_spinnerhas_keypress_supporthash_animalhash_emojihash_file_md5hash_file_sha1hash_file_sha256hash_md5hash_obj_animalhash_obj_emojihash_obj_md5hash_obj_sha1hash_obj_sha256hash_raw_animalhash_raw_emojihash_raw_md5hash_raw_sha1hash_raw_sha256hash_sha1hash_sha256is_ansi_ttyis_dynamic_ttyis_utf8_outputkeypresslist_border_styleslist_spinnerslist_symbolsmake_ansi_stylemake_spinnernonum_ansi_colorspb_barpb_currentpb_current_bytespb_elapsedpb_elapsed_clockpb_elapsed_rawpb_etapb_eta_rawpb_eta_strpb_extrapb_idpb_namepb_percentpb_pidpb_ratepb_rate_bytespb_rate_rawpb_spinpb_statuspb_timestamppb_totalpb_total_bytespluralizepretty_print_codeqtyrulerulersimple_themespark_barspark_linestart_appstop_appstyle_blurredstyle_boldstyle_dimstyle_hiddenstyle_hyperlinkstyle_inversestyle_italicstyle_no_bg_colorstyle_no_blurredstyle_no_boldstyle_no_colorstyle_no_dimstyle_no_hiddenstyle_no_inversestyle_no_italicstyle_no_strikethroughstyle_no_underlinestyle_resetstyle_strikethroughstyle_underlinesymboltest_that_clitickingtreetruecolorutf8_graphemesutf8_ncharutf8_substrvt_output

Dependencies:

Readme and manuals

Help Manual

Help pageTopics
Align an ANSI colored stringansi_align
Collapse a vector into a string scalaransi_collapse
Format a character vector in multiple columnsansi_columns
Like 'base::grep()' and 'base::grepl()', but for ANSI stringsansi_grep ansi_grepl
Check if a string has some ANSI stylingansi_has_any
Hide/show cursor in a terminalansi_hide_cursor ansi_show_cursor ansi_with_hidden_cursor
Convert ANSI styled text to HTMLansi_html
CSS styles for the output of 'ansi_html()'ansi_html_style
Count number of characters in an ANSI colored stringansi_nchar
Like 'base::nzchar()', but for ANSI stringsansi_nzchar
Perl compatible regular expression that matches ANSI escape sequencesansi_regex
Simplify ANSI styling tagsansi_simplify
Labels a character vector as containing ANSI control codes.ansi_string
Remove ANSI escape sequences from a stringansi_strip
Split an ANSI colored stringansi_strsplit
Truncate an ANSI stringansi_strtrim
Wrap an ANSI styled string to a certain widthansi_strwrap
Substring(s) of an ANSI colored stringansi_substr
Substring(s) of an ANSI colored stringansi_substring
ANSI character translation and case foldingansi_chartr ansi_tolower ansi_toupper
Remove leading and/or trailing whitespace from an ANSI stringansi_trimws
ANSI colored textansi-styles bg_black bg_blue bg_br_black bg_br_blue bg_br_cyan bg_br_green bg_br_magenta bg_br_red bg_br_white bg_br_yellow bg_cyan bg_green bg_magenta bg_none bg_red bg_white bg_yellow col_black col_blue col_br_black col_br_blue col_br_cyan col_br_green col_br_magenta col_br_red col_br_white col_br_yellow col_cyan col_green col_grey col_magenta col_none col_red col_silver col_white col_yellow style_blurred style_bold style_dim style_hidden style_inverse style_italic style_no_bg_color style_no_blurred style_no_bold style_no_color style_no_dim style_no_hidden style_no_inverse style_no_italic style_no_strikethrough style_no_underline style_reset style_strikethrough style_underline
The built-in CLI themebuiltin_theme
'cat()' helperscat_boxx cat_bullet cat_line cat_print cat_rule
Compose multiple cli functionscli
Signal an error, warning or message with a cli formatted messagecli_abort cli_inform cli_warn
CLI alertscli_alert cli_alert_danger cli_alert_info cli_alert_success cli_alert_warning
CLI block quotecli_blockquote
List of itemscli_bullets
List of verbatim itemscli_bullets_raw format_bullets_raw
A block of codecli_code
Debug cli internalscli_debug_doc
Generic CLI containercli_div
Definition listcli_dl
Close a CLI containercli_end
Capture the output of cli functions instead of printing itcli_fmt
Format a value for printingcli_format cli_format.character cli_format.default cli_format.numeric
Create a format method for an object using cli toolscli_format_method
CLI headingscli_h1 cli_h2 cli_h3
CLI list item(s)cli_li
List the currently active themescli_list_themes
Ordered CLI listcli_ol
The connection option that cli would usecli_output_connection
CLI paragraphcli_par
Indicate the start and termination of some computation in the status bar (superseded)cli_process_done cli_process_failed cli_process_start
Add a progress bar to a mapping function or for loopcli_progress_along
cli progress barsccli_tick_reset cli_progress_bar cli_progress_done cli_progress_update cli_tick_reset ticking __cli_update_due
cli progress handlerscli_progress_builtin_handlers
cli progress bar democli_progress_demo
Simplified cli progress messagescli_progress_message
Progress bar utility functions.cli_progress_cleanup cli_progress_num
Add text output to a progress barcli_progress_output
Simplified cli progress messages, with stylingcli_progress_step
List of built-in cli progress stylescli_progress_styles
CLI horizontal rulecli_rule
cli situation reportcli_sitrep
Update the status bar (superseded)cli_status
Clear the status bar (superseded)cli_status_clear
Update the status bar (superseded)cli_status_update
CLI textcli_text
Unordered CLI listcli_ul
Add custom cli style to a vectorcli_vec
CLI verbatim textcli_verbatim
cli environment variables and optionscli-config
Syntax highlight R codecode_highlight
Syntax highlighting themescode_theme_list
Combine two or more ANSI stylescombine_ansi_styles
Determine the width of the consoleconsole_width
About cli containerscontainers
Show a demo of some (by default all) spinnersdemo_spinners
Compare two character vectors elementwisediff_chr
Compare two character strings, character by characterdiff_str
Frequently Asked Questionsfaq
Format an error, warning or diagnostic messageformat_error format_message format_warning
Format and returns a line of textformat_inline
Character vector to put a spinner on the screenget_spinner
Check if the current platform/terminal supports reading single keys.has_keypress_support
Adjective-animal hashhash_animal hash_obj_animal hash_raw_animal
Emoji hashhash_emoji hash_obj_emoji hash_raw_emoji
MD5 hashhash_file_md5 hash_md5 hash_obj_md5 hash_raw_md5
SHA-1 hashhash_file_sha1 hash_obj_sha1 hash_raw_sha1 hash_sha1
SHA-256 hashhash_file_sha256 hash_obj_sha256 hash_raw_sha256 hash_sha256
About inline markup in the semantic cliinline-markup
Detect if a stream support ANSI escape charactersis_ansi_tty
Detect whether a stream supports \\r (Carriage return)is_dynamic_tty
Whether cli is emitting UTF-8 charactersis_utf8_output
Read a single keypress at the terminalkeypress
cli hyperlinkslinks
Draw a banner-like box in the consoleboxx list_border_styles
List all available spinnerslist_spinners
Create a new ANSI stylemake_ansi_style
Create a spinnermake_spinner
Pluralization helper functionsno qty
Detect the number of ANSI colors to usedetect_tty_colors num_ansi_colors
About cli pluralizationpluralization
String templating with pluralizationpluralize
Turn on pretty-printing functions at the R consolepretty_print_code
The cli progress C APIprogress-c
Progress bar variablescli__pb_bar cli__pb_current cli__pb_current_bytes cli__pb_elapsed cli__pb_elapsed_clock cli__pb_elapsed_raw cli__pb_eta cli__pb_eta_raw cli__pb_eta_str cli__pb_extra cli__pb_id cli__pb_name cli__pb_percent cli__pb_pid cli__pb_rate cli__pb_rate_bytes cli__pb_rate_raw cli__pb_spin cli__pb_status cli__pb_timestamp cli__pb_total cli__pb_total_bytes pb_bar pb_current pb_current_bytes pb_elapsed pb_elapsed_clock pb_elapsed_raw pb_eta pb_eta_raw pb_eta_str pb_extra pb_id pb_name pb_percent pb_pid pb_rate pb_rate_bytes pb_rate_raw pb_spin pb_status pb_timestamp pb_total pb_total_bytes progress-variables
Make a rule with one or two text labelsrule
Print the helpful ruler to the screenruler
A simple CLI themesimple_theme
Draw a sparkline bar graph with unicode block charactersspark_bar
Draw a sparkline line graph with Braille characters.spark_line
Start, stop, query the default cli applicationdefault_app start_app stop_app
Terminal Hyperlinksansi_has_hyperlink_support ansi_hyperlink_types style_hyperlink
Various handy symbols to use in a command line UIlist_symbols symbol
Test cli output with testthattest_that_cli
About cli themesthemes
Draw a treetree
ANSI colors palettesansi_palettes ansi_palette_show truecolor
Break an UTF-8 character vector into grapheme clustersutf8_graphemes
Count the number of characters in a character vectorutf8_nchar
Substring of an UTF-8 stringutf8_substr
Simulate (a subset of) a VT-5xx ANSI terminalvt_output