
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
cli-defaults
Advanced tools
Add default answers to your command line script.
This module will provide these options by default:
Default commands:
% ./example.js
% ./example.js --version
0.1.0
% ./example.js --help
Any cli tool should provide these options
usage: cli-defaults [options]
--help prints this message
--version prints package version
You can add custom commands:
% ./example.js --ping
pong
% ./example.js --echo 'hello world'
hello world
% ./example.js --double 42
84
% npm install --save cli-defaults
const argv = require('minimist')(process.argv.slice(2))
const CLI = require('cli-defaults')
const c = new CLI({
ping: () => console.log('pong')
})
c.answer(argv)
provides default commands (help, version) + one custom 'ping' command
For more details check example.js and test/index.test.js
FAQs
Any cli tool should provide these options
The npm package cli-defaults receives a total of 1 weekly downloads. As such, cli-defaults popularity was classified as not popular.
We found that cli-defaults 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.