
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.
clitoolkit
Advanced tools
The command line toolkit
###Installation
npm install clitoolkit
###Quick Start
File /bin/test:
#!/usr/bin/env node
var clitoolkit = require('clitoolkit');
//initial other command line tools
clitoolkit.init({
version: 1.0.1,
plugin: [
'clitoolkit-plugin-a',
'clitoolkit-plugin-b'
]
}, process.argv);
Plugin clitoolkit-plugin-a(clitoolkit-plugin-a/main.js):
module.exports = function(PluginAPI){
PluginAPI.register('a', 'command a description', [{
sample: '-d, --dest <names>',
desc: 'dest files',
defVal: 'dest'
}, {
sample: '-c, --config <names>',
desc: 'set config file',
}], function(commander, progArg){
console.log('command a running...');
});
};
Plugin clitoolkit-plugin-b(clitoolkit-plugin-b/main.js):
module.exports = function(PluginAPI){
PluginAPI.register('b', 'command b description', [{
sample: '-o, --ok <names>',
desc: 'OK!!!'
}, {
sample: '-i, --info <names>',
desc: 'command info',
}], function(commander, progArg){
console.log('command b running...');
});
};
Execute the command /bin/test:
#show the usage of command test
test --help
#show the usage of command a
test a --help
#execute the command a
test a -d -c
#show the usage of command b
test b --help
#execute the command b
test b -oi
###Init API Options
opt: type-> Object the configration
version: type-> String the command versionpluginBase(optional): type-> String the plugin root pathplugin: type-> Array the clitoolkit plugins. if can not find the plugin in pluginBase clitoolkit will find node_modules which have the same name with the target plugin.proArgv: type-> Array the progress's arguments(process.argv)###Plugin
main.jsmain.js should exports a function that with a PluginAPI argumentsExample:
module.exports = function(PluginAPI){
PluginAPI.register(cmd, desc, options, action);
};
####PluginAPI
#####register(name, desc, option, action)
name: type-> String command namedesc: type-> String descriptionoption: type-> Array command options
sample: type-> String command sample, e.g.: '-d, --dest 'desc(optional): type-> String option descriptiondefVal(optional): type-> any the default valueaction: type-> function eval this function when the command triggerFAQs
The command line toolkit
The npm package clitoolkit receives a total of 24 weekly downloads. As such, clitoolkit popularity was classified as not popular.
We found that clitoolkit 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.