
Security News
OpenClaw Skill Marketplace Emerges as Active Malware Vector
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.
shelljs-transpiler
Advanced tools
"Say goodbye to those gnarly Bash scripts!" -- @arturadib, ShellJS README
Want to try out ShellJS but don't want to go through the effort of porting all your scripts? Look no further.
Automagically transpile your Bash scripts to ShellJS. Try it out here on the web, no downloads necessary. Just type, copy-paste, or drag-and-drop your favorite shell script and copy out the generated results.
Have a lot of scripts to transpile? Clone this repository to make use of the
transpile.js executable to programmatically transpile your scripts. Check out
the Building the project section below for installation
steps.
What version of ShellJS is this compatible with? Can I run this code?
These are good questions... to which I have no good answer. I'm currently one of the maintainers of ShellJS, so I have a tendency to translate to "what ShellJS will soon become," instead of "what ShellJS currently is." The output here is designed to be compatible with what will hopefully be ShellJS v0.7+. This is because v0.7 will have support for many more Bash features (pipes, globbing, return codes, etc.), which makes for more interesting translations. I openly admit that some of these translations are to features that I haven't actually written yet for ShellJS.
The downside is that there are no guarantees that a given translation will actually run on any current release of ShellJS. The upside is that as I develop this translator, it opens my eyes to which language features ShellJS is desperately lacking.
If you want to try running a translation, the most recent version of ShellJS is
your best bet. I'll keep package.json up to date with the latest version
dependency (since always fetching the latest is a little too unstable for my
taste).
This project exposes the ohm grammar to both Node and the browser. This is
somewhat challenging to get right, because the HTML <script> tag doesn't let
.ohm files be imported with the src attribute. To work around this, I wrote
my own cross-platform tool to effectively do the replacement. This tool splices
together src/index.generator.html and src/bash.ohm to generate the top-level
index.html file.
This lets me work with my grammar in a separate file, and also expose its contents to node more easily. Aside from the convenience of allowing my grammar to be in a separate file, this makes it pretty straightforward to run unit tests, which is tremendously helpful.
This project uses gulp as its task-runner. It depends on a git submodule and
some npm packages, which can be installed like so:
$ git clone --recursive https://github.com/nfischer/shelljs-transpiler.git
$ cd shelljs-transpiler/
$ npm install -g gulp-cli
$ npm install
$ gulp # This compiles index.html from src/index.generator.html
FAQs
Translate bash to shelljs
The npm package shelljs-transpiler receives a total of 11 weekly downloads. As such, shelljs-transpiler popularity was classified as not popular.
We found that shelljs-transpiler 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
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.