
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
#cmdl 0.2.1#
A simple, yet powerful command-line interface builder.
##Installation##
##API Reference##
###cmdl.init( options )###
Initializes your CLI.
cli.init({
version: '0.0.1',
name: 'DemoCLI',
promptEnabled: true
});
Options:
version
: the version of your CLI. this option is mandatoryname
: the name of your CLI. Mandatory if you use the prompt featurepromptEnabled
: set this to true if you want to enable the prompt feature (default: false)###cmdl.addCommand( properties )###
Adds a CLI command. A command can have several options.
cli.addCommand({
name: 'create',
description: 'create a new blog',
options: [{
name: 'name',
short: 'n',
type: 'string',
description: 'blog name',
example: 'cmdl-test create -n testblog'
}],
callback: function(args) {
console.log("create method was called: ", args);
}
});
###cmdl.addOption( properties )###
Adds a CLI option. The option can take one value as parameter.
cli.addOption({
name: 'port',
short: 'p',
type: 'int',
description: 'port',
example: 'cmdl-test -p 8080',
callback: function(port) {
console.log("Port is: ", port);
}
});
###cmdl.prompt( schema, callback )###
Creates an interactive prompt for your CLI.
var schema = [
{
description: 'Enter your username',
name: 'username',
resultequired: true
},
{
description: 'Enter your password',
name: 'password',
hidden: true,
conform: function (value) {
return true;
}
}
];
cli.prompt(schema, function (err, result) {
console.log('cmdl received:');
console.log(' username: ' + result.username);
console.log(' password: ' + result.password);
});
As of version 0.2.0, cdml makes use of flatiron's prompt module for its prompt feature. Please take a look at their README for the various options (cdml.prompt is a wrapper around prompt.get).
###cmdl.execute( command, callback )###
Executes a system command (for UNIX-based systems only).
cli.execute('ls -alF', function(err, stdout, stderr) {
if(err) throw err;
if(stderr) throw stderr;
console.log("responsse: ", stdout);
});
###cmdl.listen()###
Enables the CLI.
cli.listen();
##Test##
npm test
##Demo##
npm install -g cmdl
cmdl-test -h
##LICENSE##
The MIT License (MIT)
Copyright (c) 2013 Stéphane P. Péricat
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A simple, yet powerful command-line interface builder
The npm package cmdl receives a total of 390 weekly downloads. As such, cmdl popularity was classified as not popular.
We found that cmdl 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.