
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
Make your ShellJS commands explicit and get a beautiful output.
Get this:

With this:
var shout = require('shoutjs');
shout.mkdir('bleach');
shout.to('bleach/ichigo', 'Bankai!');
shout.rm('-rf', 'bleach');
Supported ShellJS commands are: cp, rm, mv, mkdir, to.
ShoutJS only wraps ShellJS commands which change the filesystem. For usage information, you can go here ShellJS.
There's only to which differs from ShellJS:
var shell = require('shelljs/global'),
shout = require('shoutjs');
'Bankai!'.to('file'); // ShellJS
shout.to('file', 'Bankai!'); // ShoutJS
ShoutJS supports theming through Logan. So it's possible to customize ShoutJS output pretty much the way you want.
Here is the default theme:
// Default theme
shout.logan.set({
cp : [' copy % to %', 'cyan . cyan .'],
rm : [' remove % ', 'red '],
mv : [' move % to %', 'cyan . cyan .'],
mkdir : [' create % ', 'cyan '],
to : [' create % ', 'cyan '],
exec : [' exec % ', 'blue . ']
});
To override it:
// A bit more old fashioned theme...
shout.logan.set({
cp : ['cp % %', 'grey'],
rm : ['rm % ', 'grey'],
// ...
});
In many cases, you may want to log more than ShellJS commands for your users.
The recommanded way is to use Logan.
Here's an example:
var shout = require('shoutjs'),
logan = require('logan');
logan.set({
info: [' info %', 'yellow']
});
logan.info('starting script...');
shout.rm('file.txt');
logan.info('done');
You can disable ShoutJS output using logan.silent option.
shout.logan.silent = true;
shout.to('ichigo.txt', 'Bankai!'); // No output
Have a bug or missing a new command introduced in ShellJS? Please create an issue here on GitHub!
If you've created a theme for ShellJS feel free to drop me a message @typicode.
FAQs
Beautiful output for your ShellJS commands
We found that shoutjs 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
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.