Gathering detailed insights and metrics for @isaacs/cliui
Gathering detailed insights and metrics for @isaacs/cliui
easily create complex multi-column command-line-interfaces.
npm install @isaacs/cliui
Typescript
Module System
Min. Node Version
Node Version
NPM Version
98.6
Supply Chain
99.1
Quality
75
Maintenance
100
Vulnerability
100
License
JavaScript (55.42%)
TypeScript (44.58%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,632,993,147
Last Day
6,027,797
Last Week
32,996,896
Last Month
135,474,963
Last Year
1,204,668,553
ISC License
373 Stars
134 Commits
43 Forks
10 Watchers
10 Branches
20 Contributors
Updated on Mar 17, 2025
Minified
Minified + Gzipped
Latest Version
8.0.2
Package Id
@isaacs/cliui@8.0.2
Unpacked Size
27.15 kB
Size
5.95 kB
File Count
7
NPM Version
9.6.5
Node Version
18.16.0
Published on
May 02, 2023
Cumulative downloads
Total Downloads
Temporary fork of cliui.
easily create complex multi-column command-line-interfaces.
1const ui = require('cliui')() 2 3ui.div('Usage: $0 [command] [options]') 4 5ui.div({ 6 text: 'Options:', 7 padding: [2, 0, 1, 0] 8}) 9 10ui.div( 11 { 12 text: "-f, --file", 13 width: 20, 14 padding: [0, 4, 0, 4] 15 }, 16 { 17 text: "the file to load." + 18 chalk.green("(if this description is long it wraps).") 19 , 20 width: 20 21 }, 22 { 23 text: chalk.red("[required]"), 24 align: 'right' 25 } 26) 27 28console.log(ui.toString())
As of v7
cliui
supports Deno and
ESM:
1import cliui from "https://deno.land/x/cliui/deno.ts"; 2 3const ui = cliui({}) 4 5ui.div('Usage: $0 [command] [options]') 6 7ui.div({ 8 text: 'Options:', 9 padding: [2, 0, 1, 0] 10}) 11 12ui.div({ 13 text: "-f, --file", 14 width: 20, 15 padding: [0, 4, 0, 4] 16}) 17 18console.log(ui.toString())
cliui exposes a simple layout DSL:
If you create a single ui.div
, passing a string rather than an
object:
\n
: characters will be interpreted as new rows.\t
: characters will be interpreted as new columns.\s
: characters will be interpreted as padding.as an example...
1var ui = require('./')({ 2 width: 60 3}) 4 5ui.div( 6 'Usage: node ./bin/foo.js\n' + 7 ' <regex>\t provide a regex\n' + 8 ' <glob>\t provide a glob\t [required]' 9) 10 11console.log(ui.toString())
will output:
1Usage: node ./bin/foo.js 2 <regex> provide a regex 3 <glob> provide a glob [required]
1cliui = require('cliui')
Specify the maximum width of the UI being generated.
If no width is provided, cliui will try to get the current window's width and use it, and if that doesn't work, width will be set to 80
.
Enable or disable the wrapping of text in a column.
Create a row with any number of columns, a column can either be a string, or an object with the following options:
right
or center
.[top, right, bottom, left]
.Similar to div
, except the next row will be appended without
a new line being created.
Resets the UI elements of the current cliui instance, maintaining the values
set for width
and wrap
.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 3/19 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-03-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
1.3%
6,027,797
Compared to previous day
Last Week
3.2%
32,996,896
Compared to previous week
Last Month
9.1%
135,474,963
Compared to previous month
Last Year
181.3%
1,204,668,553
Compared to previous year