{"library":"shelljs-transpiler","title":"shelljs-transpiler","description":"Translate Bash scripts to ShellJS (shelljs) code. Current stable version is 0.2.6, with a pre-1.0 release cadence. It supports both a web interface and a CLI tool `sh2js`. Unlike manual porting, it automates conversion of common Bash constructs to ShellJS API calls. Notable limitations: not all Bash syntax is handled until v1.0; translations may rely on unimplemented ShellJS features. The tool is experimental and community-driven, with limited maintenance.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install shelljs-transpiler"],"cli":{"name":"sh2js","version":null}},"imports":["npx sh2js script.sh output.js","import { transpile } from 'shelljs-transpiler'","import shelljsTranspiler from 'shelljs-transpiler'","import { ShellJS } from 'shelljs-transpiler'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { transpile } from 'shelljs-transpiler';\n\nconst bashScript = 'echo hello; ls -la';\nconst shelljsCode = transpile(bashScript);\nconsole.log(shelljsCode);\n// Output: 'console.log(\"hello\");\\nshell.ls(\"-la\");'","lang":"typescript","description":"Transpile a simple Bash script (echo and ls) to ShellJS code.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}