shjs binary, formerly distributed as part of
ShellJS.
npm install -g shelljs-shjsNote: this package is published as shelljs-shjs, not as shjs.
While this package is not explicitly deprecated, this is in maintenance mode. If
you want to execute ShellJS scripts, just use the node command (or whatever is
appropriate for the language of the script, ex. coffee).
This package was removed from ShellJS to reduce that module's dependencies and to shrink overall download size.
You can install with npm install shelljs-shjs:
$ npm install -g shelljs-shjsThis script is a convenience wrapper for guessing the right interpreter to use
for your script. It also brings your local shelljs install to the front of the
NODE_PATH to ensure this is used.
#!/usr/bin/env shjs
// Save this demo as 'example_script.js'
var shell = require('shelljs');
shell.echo('hello world');Then run the demo script with:
$ shjs example_script.js
hello world