Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Feb 29, 2024 via pnpm

cliui 7.0.4

easily create complex multi-column command-line-interfaces
Package summary
Share
0
issues
2
licenses
9
MIT
1
ISC
Package created
20 Apr 2015
Version published
9 Nov 2020
Maintainers
2
Total deps
10
Direct deps
3
License
ISC

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
9 Packages, Including:
ansi-regex@5.0.1
ansi-styles@4.3.0
color-convert@2.0.1
color-name@1.1.4
emoji-regex@8.0.0
is-fullwidth-code-point@3.0.0
string-width@4.2.3
strip-ansi@6.0.1
wrap-ansi@7.0.0

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
cliui@7.0.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of cliui 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
string-width4.2.32.33 kBMIT
prod
strip-ansi6.0.11.99 kBMIT
prod
wrap-ansi7.0.04.22 kBMIT
prod

Visualizations

Frequently Asked Questions

What does cliui do?

Cliui is a Node.js package designed to easily create complex multi-column command-line-interfaces. It provides a simple and effective way to manage the layout of your command-line tool's UI, including creating rows with multiple columns, manipulating text width and alignment, and even managing padding and bordering. It exposes a simple layout DSL for column and row creation and supports the interpretation of '\n', '\t', and '\s' characters as new rows, new columns, and padding, respectively.

How do you use cliui?

To utilize cliui, begin by installing it via npm:

npm install cliui

Then, in your JavaScript file, require it and create a new instance:

const ui = require('cliui')()

Next, you can start building your interface using the div method:

ui.div('Usage: $0 [command] [options]')

You can then create multiple columns inside your row using object objects:

ui.div(
  {
    text: "-f, --file",
    width: 20,
    padding: [0, 4, 0, 4]
  },
  {
    text: "the file to load."
  },
  {
    text: "required",
    align: 'right'
  }
)

Finally, output the UI as a string to display it:

console.log(ui.toString())

For a full reference of the available functions and their usage, look at the Methods Section in the readme.

Where are the cliui docs?

The cliui documentation is available directly within the readme file of the official GitHub repository, https://github.com/yargs/cliui. Here, you'll find detailed usage examples, method explanations, different object options for text width, padding, and alignment manipulation, and much more. Follow the link to access and learn more about effectively utilizing cliui in your projects.