Skip to main content

From sheBanG to Shim

Project description

BanG Shim!

Make scripts with shebang executable in Windows by adding shim.

Usage

  1. Install bangshim with uv
uv tool install bangshim

or pip

pip install bangshim

It's also recommended to install uutils/coreutils for the env in shebang

  1. Write any script with shebang, supposing you have an intepreter (Git Bash, MSYS2, etc.) installed for your scripts.
#!/usr/bin/sh
print("Hello World")
  1. Make your script executable
bangshim ./myscript.sh
./myscript
# "Hello World"

FAQ

  1. Q: Why doing this?
    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 work in Windows.

  2. Q: How it works?
    A: bangshim do a simple things, search intepreter from shebang in PATH, and generate args for shim.

  3. Q: How to work with /usr/bin/env ?
    A: We suppose you installed an env.exe in your PATH. For example, you can install uutils/coreutils by scoop install uutils-coreutils

Build

See Makefile for more information

Credit

  1. shim.exe from kiennq/scoop-better-shimexe licensed under MIT OR Unlicense

License

Copyright 2025 Winterreisender

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bangshim-0.1.0.tar.gz (87.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bangshim-0.1.0-py3-none-any.whl (86.5 kB view details)

Uploaded Python 3

File details

Details for the file bangshim-0.1.0.tar.gz.

File metadata

  • Download URL: bangshim-0.1.0.tar.gz
  • Upload date:
  • Size: 87.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.15

File hashes

Hashes for bangshim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0454d724ed7796959461b1ca255e509f8826928e5ddb76b0f53ff39193d5c720
MD5 b49391e12b459259bff7024debfe40d5
BLAKE2b-256 e75214dd1c34855b54ac5a44cfcabae129113cd64c3c7cd3ae989e5890efc260

See more details on using hashes here.

File details

Details for the file bangshim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bangshim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 86.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.15

File hashes

Hashes for bangshim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9afce7e069255c72ef816291032b497b2dbaacc29b9abb24722c0aa9d25d8f65
MD5 3eaad939488e00c5c67ab96c3541477c
BLAKE2b-256 2f75f22060b528c8d2a11c6723d7aecd6430e73711d3ceda39e8bd742f22117e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page