Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 31, 2024 via pnpm
Package summary
Share
0
issues
2
licenses
7
ISC
6
MIT
Package created
1 Jan 2011
Version published
23 Oct 2016
Maintainers
1
Total deps
13
Direct deps
2
License
MIT

Issues

0
This package has no issues

Licenses

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
7 Packages, Including:
fs.realpath@1.0.0
glob@7.2.3
inflight@1.0.6
inherits@2.0.4
minimatch@3.1.2
once@1.4.0
wrappy@1.0.2

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
6 Packages, Including:
balanced-match@1.0.2
brace-expansion@1.1.11
cli@1.0.1
concat-map@0.0.1
exit@0.1.2
path-is-absolute@1.0.1
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

2
All Dependencies CSV
ⓘ This is a list of cli 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
exit0.1.214.94 kBMIT
prod
glob7.2.315.08 kBISC
prod

Visualizations

Frequently Asked Questions

What does cli do?

CLI—Command Line Interface—provides a toolkit for rapidly building command line applications in JavaScript. It has a fully-featured command line arguments (opts/args) parser, supports plugins for adding common options and switches, offers helper methods for working with input/output and spawning child processes, and can output styled or colored messages including progress bars and spinners.

How do you use cli?

To start using CLI, first install it via NPM using the command npm install cli. CLI can be used to process input, sort and output data, handle command line arguments, and more. Here are some code examples:

For basic usage:

#!/usr/bin/env node
require('cli').withStdinLines(function(lines, newline) {
    this.output(lines.sort().join(newline));
});

To use with command line arguments:

var cli = require('cli'), options = cli.parse();
cli.withStdinLines(function(lines, newline) {
    lines.sort(!options.n ? null : function(a, b) {
        return parseInt(a) > parseInt(b);
    });
    if (options.r) lines.reverse();
    this.output(lines.join(newline));
});

For parsing command line arguments:

cli.parse({
	file: [ 'f', 'A file to process', 'file', 'temp.log' ],
	time: [ 't', 'An access time', 'time', false],                 
	work: [ false, 'What kind of work to do', 'string', 'sleep' ]  
});

For progress handling:

cli.progress(progress); //Where 0 <= progress <= 1

To use built-in plugins:

cli.enable(plugin1, [plugin2, ...]); 

Where are the cli docs?

The CLI documentation is contained within the readme of the GitHub repository. You can access it by navigating to the repository at git+ssh://git@github.com/node-js-libs/cli.git. You'll find a detailed explanation of the library's functionality, as well as a guide on how to utilize its methods and examples of usage. For any updates and advancements in the package, the GitHub repository will be the source of truth.