Skip to main content

From sheBanG to Shim

Project description

#BanG Shim!

PyPI - Downloads PyPI - Python Version GitHub Created At

Make scripts with shebang executable in Windows by adding shim.

Usage

  1. Install bangshim with scoop
scoop install https://raw.githubusercontent.com/Winterreisender/bangshim/refs/heads/master/bangshim.json

or 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.1.tar.gz (87.4 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.1-py3-none-any.whl (86.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bangshim-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3c8ac6030a434f8f7997fdc0bc83ec86f9bc07859e7ef0331649ccae9e57da15
MD5 97baf6c8e3aa434d13d7cb347f9c98fc
BLAKE2b-256 e8b6567b84f8dcd81230b621a2cfdbbc6febebb6c4846cbd0c062d1bb7d6b565

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bangshim-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 76a01fbb8b6c30402ceba6b7606f4435cc445055942721cd35779cb0b13d6b96
MD5 1550f3ab05470c2b84274d5f61d23e77
BLAKE2b-256 736ca037edfd6a2762c1bfa8dd792ae834723c835336527d60d654df5436bfb6

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