{"id":22843410,"url":"https://github.com/milahu/shelljs-async","last_synced_at":"2026-04-29T20:31:05.864Z","repository":{"id":109861345,"uuid":"573573465","full_name":"milahu/shelljs-async","owner":"milahu","description":"bash syntax and gnu coreutils in javascript. async version of shelljs","archived":false,"fork":false,"pushed_at":"2022-12-13T14:22:56.000Z","size":1365,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-19T23:36:46.357Z","etag":null,"topics":["bash","bash-interpreter","bash2js","sh2js","shell","shelljs"],"latest_commit_sha":null,"homepage":"https://milahu.github.io/shelljs-async/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milahu.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-02T19:48:48.000Z","updated_at":"2022-12-15T01:31:12.000Z","dependencies_parsed_at":"2023-03-09T15:30:39.259Z","dependency_job_id":null,"html_url":"https://github.com/milahu/shelljs-async","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/milahu/shelljs-async","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milahu%2Fshelljs-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milahu%2Fshelljs-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milahu%2Fshelljs-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milahu%2Fshelljs-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milahu","download_url":"https://codeload.github.com/milahu/shelljs-async/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milahu%2Fshelljs-async/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32443258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bash-interpreter","bash2js","sh2js","shell","shelljs"],"created_at":"2024-12-13T02:14:37.472Z","updated_at":"2026-04-29T20:31:05.850Z","avatar_url":"https://github.com/milahu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shelljs-async\n\nbash syntax and gnu coreutils in javascript\n\nasync version of [shelljs](https://github.com/shelljs/shelljs)\n\nweb version of [cash](https://github.com/dthree/cash)\n\n- works in a web browser\n  - browserfs\n  - xterm.js\n- async by default\n  - https://github.com/shelljs/shelljs/issues/2\n- emulate an interactive shell\n  - parse input strings from a bash prompt\n\n## status\n\nproof of concept\n\n## examples\n\n```js\nawait ls(\".\").print()\n/*\ntest.txt\nhello.txt\nreadme.md\nsrc\ndemo\n*/\n\nawait ls(\".\").debug()\n/*\nstream 1: chunk: \"test.txt\\n\"\nstream 1: chunk: \"hello.txt\\n\"\nstream 1: chunk: \"readme.md\\n\"\nstream 1: chunk: \"src\\n\"\nstream 1: chunk: \"demo\\n\"\n*/\n\nawait ls(\".\").pipe(grep).stdout()\n/*\ngrep: test.txt\ngrep: hello.txt\ngrep: readme.md\ngrep: src\ngrep: demo\n*/\n\nawait cat(\"test.txt\").print()\n/*\nCool, I can do this in the browser!\n*/\n\nawait seq(20).pipe(head, \"-n\", \"5\").print()\n/*\n1\n2\n3\n4\n5\n*/\n```\n\n## challenges\n\n### signals\n\nevery consumer process can send signals to the producer process\n\n## reading\n\n### generators\n\n- https://maetl.net/notes/experiments/lazy-pipelines-js-generators\n- https://javascript.plainenglish.io/javascript-lazy-evaluation-generators-examples-included-f9eaa517f969\n\n## similar projects\n\n- https://github.com/dthree/cash - 8K stars - Cross-platform Linux commands in ES6. only for node.js\n  - https://news.ycombinator.com/item?id=11334597\n- https://github.com/shelljs/shelljs - 14K stars\n  - https://github.com/nfischer/shelljs-transpiler - transpile Bash to ShellJS\n- https://www.npmjs.com/package/posix-browser - concept: posix system calls in the browser\n  - part of https://github.com/sagemathinc/cowasm\n- https://github.com/yankeeinlondon/async-shelljs - adds an async implementation of \"exec\"\n- https://github.com/miketalbot/js-coroutines - async generators: JSON.parse, JSON.stringify, compress, decompress\n- https://github.com/bashojs/basho - 120 stars - Lazy shell pipelines in plain JavaScript\n- https://github.com/plasma-umass/browsix - https://browsix.org/ - 3K stars - Browsix is a Unix-like operating system for the browser.\n- https://github.com/UltiRequiem/coreutils - 30 stars - deno - Cross-platform Deno rewrite of the GNU Coreutils\n- https://github.com/rethab/deno-bash - A silly little bash interpreter written in TypeScript for Deno.\n- https://github.com/taokann/WeBash\n- https://github.com/lpan/rebash - react\n- https://github.com/mullaney/bash - minimal, some commands, fs async api\n- https://github.com/austinoboyle/bash - react\n- https://github.com/hamaxx/jsbash - Basic bash interpreter in javascript. pipes\n- https://github.com/stencila/basha - Bash interpreter for executable documents. deprecated for https://github.com/takluyver/bash_kernel in python and https://github.com/stencila/stencila\n- https://github.com/krithravi/bash-prompt-interpreter - Interprets the values of Bash prompts. Submitted to Sunhacks 2020!\n- https://github.com/codemirror/legacy-modes/blob/main/mode/shell.js\n- https://github.com/milahu/nix-eval-js - nix interpreter in javascript, based on lezer-parser\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilahu%2Fshelljs-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilahu%2Fshelljs-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilahu%2Fshelljs-async/lists"}