
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Simple and well written command line applications helper
Clito, pronounced as in "clitoris", stands for cli-tools and it's a well written command line application helper. It will become your best friend when dealing with cli applications, once you start play with it you will like it more than any other tool. :smirk:

Oops.. move along children, you are holding up the line, let see some features now..
--no- prefix--version--helpInstall the module using your favourite package manager:
npm install clito
Load it in your application code and set it up:
#!/usr/bin/env node
const clito = require('clito');
const cli = clito({
usage: 'askme <question>',
flags: {
person: {
type: 'string',
alias: 'p',
default: 'chef'
}
},
examples: [
'askme -p "ghandi" "Do you ever got angry?"'
]
})
const {input, flags} = cli
const [question] = input
if (!question || question === '') {
console.error('You must ask a question first!');
process.exit(1);
}
if (flags.person === 'chef') {
console.log('> You gotta find the clitoris children.');
} else {
// evaluate question and answer it
}
Than run it with some input and options:
$ node ./index.js "How do you make a girl love you more than other people?"
> You gotta find the clitoris children.
The module can accept various options to customize the behavior or help string output.
Type: Object
Required: true
An object of name paired flags that are going to be used as command options and parsed.
A flag itself it's an object than can take various properties to describe how the flag should be parsed and outputted in help message:
Example flag:
{
foo: {
type: 'string',
alias: 'f',
description: 'A foo option',
default: 'bar',
validation: (v) => true,
required: false,
multiple: false
}
}
Type: String
Add a custom banner string to be printed on top of --help message.
Type: String
Default: $ {pkg.name} <input>
Set a custom usage string to be used in --help message.
Type: String, String[]
Add custom command usage examples to be appended on bottom of --help message.
Type: Number
Default: 0
Set the indentation size used in the built-in help message.
Type: Boolean
Default: true
Shows the command version when called with --version.
Type: Boolean
Default: true
Shows the built-in command help when called with --help.
This package is under MIT license and its made with love by Filippo Conti
FAQs
Simple and well written command line applications helper
We found that clito demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.