js-to-sh

JSON →
library 1.2.1 ·javascript
verified May 1, 2026

js-to-sh (v1.2.1) is a JavaScript-to-ShellScript transpiler that uses abstract syntax trees (AST) to convert JavaScript syntax into bash scripts. It is experimental and unstable, with limited support for complex JavaScript features (classes are converted to functions but not fully implemented). The library provides a CLI tool and a programmatic API for transpiling .js/.ts files into .sh files. It includes built-in global helper functions for shellscript behaviors (file checks, command existence, etc.). The project is under active development with a small community, and it depends on Node.js >=20. Key differentiators: direct AST-based conversion, global variable injection for shell-style checks, and both ESM and CommonJS support.

total hits 8
actors 3 distinct systems
last hit 4d ago AhrefsBot
GPTBot
2
Script
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇸🇬 Singapore · 🇮🇳 India