Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@absolunet/cli
Advanced tools
CLI utilities
Built around meow
$ npm install @absolunet/cli
const cli = require('@absolunet/cli');
cli.initTasksList('./tasks');
cli.setUsageTasks({
// Base
'start': ['start', 'Start project'],
'stop': ['stop', 'Stop project'],
'log': [`log ${cli.optionalPlaceholder('<sub>')}`, 'Show log for sub', ['sub1', 'sub2']],
// Options
'--help': ['-h, --help', 'Show help'],
'--version': ['-v, --version', 'Show version']
});
cli.setFullUsage({
'Base': ['start', 'stop', 'log'],
'Options': ['--help', '--version']
});
console.log(cli.fullUsage);
Test project description
Usage: testprj <command>
Base
start Start project
stop Stop project
log [<sub>] Show log for sub [sub1|sub2]
Options
-h, --help Show help
-v, --version Show version
testprj@1.2.3 /usr/local/bin/testprj
init([options])
Build tasks list from js filenames
Type: string
Path to package.json
folder
Type: object
package.json
-like object
initTasksList(tasksPath)
Build tasks list from js filenames
Required
Type: string
Path to tasks folder
tasksRouter(meowCli)
Require task file specified by CLI
Required
Type: object
meow object
tasks
Type: Array
List of tasks
placeholder(name)
Look placeholder
Return string
of looked placeholder
Required
Type: string
Text to theme
optional(name)
Look optional
Return string
of looked optional
Required
Type: string
Text to theme
optionalPlaceholder(name)
Look optional placeholder
Return string
of looked optional placeholder
Required
Type: string
Text to theme
setUsageTasks(commands)
Set tasks usage and autocomplete data
Required
Type: object
Check example for structure
setFullUsage(fullUsage [, options])
Set full usage structure
Required
Type: object
Check example for structure
Type: boolean
Show version and bin location
Default: true
getTaskUsage(task)
Get task usage
Return string
of task usage
Required
Type: string
Check example for structure
showTaskUsage(meowCli)
Display task usage and quit
Required
Type: object
meow object
fullUsage
Type: string
Description and tasks formatted as a user manual
refuseArguments(meowCli)
Show task usage and quit if CLI call has arguments
Required
Type: object
meow object
ow
Type: Object
Instance of local ow
refuseFlags(meowCli)
Show task usage and quit if CLI call has flags
Required
Type: object
meow object
refuseFlagsAndArguments(meowCli)
Show task usage and quit if CLI call has arguments or flags
Required
Type: object
meow object
validateFlags(meowCli, flag)
Show task usage and quit if CLI call has flags that are not whitelisted and do not validate
Return object
of flags values
Required
Type: object
meow object
Required
Type: object
of flag validators
Whitelisted flags and their ow
predicate (use cli.ow
to ensure to use the same version)
isRoot()
Check if CLI is run by root user
Return boolean
binName
Type: string
Binary name
rawArguments
Type: string
Space separated arguments from terminal
MIT © Absolunet
FAQs
CLI utilities
We found that @absolunet/cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.