{"id":21391610,"url":"https://github.com/multiprocessio/crosh","last_synced_at":"2025-07-28T11:07:19.940Z","repository":{"id":47160111,"uuid":"405099721","full_name":"multiprocessio/crosh","owner":"multiprocessio","description":"Minimal CROss-platform SHell (WIP, code is not real yet)","archived":false,"fork":false,"pushed_at":"2021-09-10T15:09:11.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T13:28:06.254Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/multiprocessio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-10T14:00:02.000Z","updated_at":"2022-11-09T18:13:39.000Z","dependencies_parsed_at":"2022-09-19T00:51:46.699Z","dependency_job_id":null,"html_url":"https://github.com/multiprocessio/crosh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/multiprocessio/crosh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiprocessio%2Fcrosh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiprocessio%2Fcrosh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiprocessio%2Fcrosh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiprocessio%2Fcrosh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multiprocessio","download_url":"https://codeload.github.com/multiprocessio/crosh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiprocessio%2Fcrosh/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267505099,"owners_count":24098346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-22T13:34:49.290Z","updated_at":"2025-07-28T11:07:19.907Z","avatar_url":"https://github.com/multiprocessio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crosh: minimal CROss-platform SHell (WIP, code is not real yet)\n\nCrosh is a minimal Bash-like language for cross-platform scripting on\nWindows, macOS, and Linux. The goal is to cover up some of the major\ndifferences between PowerShell and Bash like behavior of mv, cp, basic\nfile manipulation, environment variables, and basic control flow.\n\nFundementally though, it must be similar enough to Bash that it's not\neasier to go learn a foreign cross-platform shell like\n[Xonsh](https://xon.sh/),\n[Nushell](https://github.com/nushell/nushell), or\n[scsh](https://scsh.net/). Though all of these are more mature and\ngood choices, they require more investment to learn them since they\nare less Bash-like.\n\n## Non-Goals\n\n* Support all of the Bash spec\n* Be completely identical when cloning Linux userland programs like mv, cp\n* Job control\n* Pipes\n* Complex expressions (array manipulation, string manipulation, arithmetic, etc.)\n\n## WARNING \n\nSince it is new, it should be considered unsafe for anything but\ncontainerized build environments where it doesn't matter so much if\nthe language implementation has bugs.\n\n### Declarations\n\n#### x = 1\n\n#### export x = 1\n\nThis adds `X=1` to the environment variables passed to any execututions called.\n\n### Subshells\n\n#### $(ls ./file)\n\n#### ?$(ls ./file)\n\n### Control Flow\n\n#### if $(eq \"a\" $var) ... elif $?--minify ... else ... endif\n\n#### for file in $(ls ./dir) ... endfor\n\n### Builtin Variables\n\n#### $N\n\nArguments can be addressed like in Bash: `$0`, `$1`... `$N`.\n\n#### $@\n\nAll arguments excluding `$0`.\n\n#### $--my-flag, $-m, $-my-flag\n\nReturns the command line argument following the flag.\n\n#### $?--my-flag, $?-m, $?-my-flag\n\nReturns true if the flag exists in command line arguments.\n\n#### $MY_ENV\n\nReturns the environment variable value or empty string if it is not set.\n\n#### $?MY_ENV\n\nReturns true if the environment variable has been set.\n\n### Builtin Functions\n\n#### exit $code\n\n#### which gcc\n\n#### prepend \"string\\n\" ./file\n\nThis modifies the file, adding the prefix string.\n\n#### append \"\\nstring\\n\" ./file\n\nThis modifies the file, adding the suffix string.\n\n#### replace \"string-or-regexp\" ./file\n\n#### mv ./from-file ./to-file\n\n#### rm ./file ./or-directory\n\n#### cp ./file ./or-directory\n\n#### cd' ./directory\n\n#### eq $a $b\n\n#### neq $a $b\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiprocessio%2Fcrosh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultiprocessio%2Fcrosh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiprocessio%2Fcrosh/lists"}