{"id":31074161,"url":"https://github.com/winterreisender/bangshim","last_synced_at":"2025-10-14T00:04:20.173Z","repository":{"id":313862283,"uuid":"1053181180","full_name":"Winterreisender/bangshim","owner":"Winterreisender","description":"[WIP]BanG Shim! From sheBanG to Shim","archived":false,"fork":false,"pushed_at":"2025-09-09T05:45:14.000Z","size":148,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-09T08:30:47.868Z","etag":null,"topics":["powershell","shell","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Winterreisender.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-09T05:22:41.000Z","updated_at":"2025-09-09T05:43:50.000Z","dependencies_parsed_at":"2025-09-09T08:30:50.862Z","dependency_job_id":"256741a9-25b3-4fa1-ab34-392757077887","html_url":"https://github.com/Winterreisender/bangshim","commit_stats":null,"previous_names":["winterreisender/bangshim"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Winterreisender/bangshim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Winterreisender%2Fbangshim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Winterreisender%2Fbangshim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Winterreisender%2Fbangshim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Winterreisender%2Fbangshim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Winterreisender","download_url":"https://codeload.github.com/Winterreisender/bangshim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Winterreisender%2Fbangshim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275348511,"owners_count":25448626,"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-09-16T02:00:10.229Z","response_time":65,"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":["powershell","shell","windows"],"created_at":"2025-09-16T02:04:10.442Z","updated_at":"2025-10-14T00:04:20.166Z","avatar_url":"https://github.com/Winterreisender.png","language":"Python","readme":"\u003cdiv align=\"center\" \u003e\r\n    \r\n# #Bang Shim!\r\n\u003cimg src='asset/banner.jpg' width=\"33%\"/\u003e\r\n\r\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/bangshim)](https://pypi.org/project/bangshim)\r\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/bangshim.svg)](https://pypi.org/project/bangshim)\r\n![GitHub Created At](https://img.shields.io/github/created-at/Winterreisender/bangshim)\r\n\r\nMake scripts with shebang executable in Windows by adding [shim](https://docs.chocolatey.org/en-us/features/shim/).\r\n\r\n\u003c/div\u003e\r\n\r\n## Quick Start\r\n1. Install bangshim with [scoop](https://scoop.sh/)\r\n    ```sh\r\n    scoop install https://raw.githubusercontent.com/Winterreisender/bangshim/refs/heads/master/bangshim.json\r\n    ```\r\n    or [uv](https://docs.astral.sh/uv/)\r\n    ```sh\r\n    uv tool install bangshim\r\n    ```\r\n    or pip\r\n    ```sh\r\n    pip install bangshim\r\n    ```\r\n    It's also recommended to install [uutils/coreutils](https://github.com/uutils/coreutils) for the `env` in shebang\r\n\r\n2. Write any script with [shebang](https://www.in-ulm.de/~mascheck/various/shebang/), supposing you have an intepreter (Git Bash, MSYS2, Python,etc.) installed in `PATH` for your scripts.\r\n    \r\n    ```python\r\n    #!/usr/bin/python\r\n    print(\"Hello World\")\r\n    ```\r\n\r\n3. Make your script executable\r\n    ```sh\r\n    bangshim ./myscript.sh\r\n    ./myscript\r\n    # \"Hello World\"\r\n    ```\r\n## More Usage\r\n\r\n1. Search your script in `PATH` and make it executable. Supposing your have a `my_script.js` with a Node.js shebang. You can simply run `bangshim my_script.js`. Then you can call `my_script` in your console directly. \r\n\r\n## FAQ\r\n\r\n1. Q: Why doing this?  \r\n    A: shebang is the Unix way for executable scripts, while shim are the best practice for Windows. And this is a tool to make the Unix style scripts work in Windows. \r\n\r\n\r\n2. Q: How it works?  \r\n    A: bangshim do a simple things, search intepreter from shebang in `PATH`, and generate args for [shim](https://docs.chocolatey.org/en-us/features/shim/). The folder path, like `/usr/bin/` is ignored so that your script will work in Linux/Windows.\r\n\r\n3. Q: How to work with `/usr/bin/env` ?  \r\n    A: We suppose you installed an `env.exe` in your `PATH`. For example, you can install [uutils/coreutils](https://github.com/uutils/coreutils) by `scoop install uutils-coreutils`\r\n\r\n\r\n## Build\r\n\r\nSee [Makefile](Makefile) for more information\r\n\r\n## Credit\r\n1. `shim.exe` from [kiennq/scoop-better-shimexe](https://github.com/kiennq/scoop-better-shimexe) licensed under `MIT OR Unlicense`\r\n\r\n## License\r\n\r\n    Copyright 2025 Winterreisender\r\n\r\n    Licensed under the Apache License, Version 2.0 (the \"License\");\r\n    you may not use this file except in compliance with the License.\r\n    You may obtain a copy of the License at\r\n\r\n        http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n    Unless required by applicable law or agreed to in writing, software\r\n    distributed under the License is distributed on an \"AS IS\" BASIS,\r\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n    See the License for the specific language governing permissions and\r\n    limitations under the License.\r\n\r\n\r\n\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinterreisender%2Fbangshim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinterreisender%2Fbangshim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinterreisender%2Fbangshim/lists"}