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.2.0.tar.gz (87.6 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.2.0-py3-none-any.whl (87.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bangshim-0.2.0.tar.gz
Algorithm Hash digest
SHA256 35c4adc196a5c3593f87cf1730e5c75411db514a3d6ae7b140edbeb8bf100a63
MD5 524fa07b679b0dd1fa435fb4881659f9
BLAKE2b-256 c0ef672ac6b7c2a5d7e764acc0f6e192f00d883257ba01b4f6e154d60a0ffd01

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bangshim-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 857eed64dd615c8ef59c93e6d63b3e554d3d881dc4f450ec7cf740c09d6ea1e5
MD5 d2426eede7b4dad02a8ff416aaaa5229
BLAKE2b-256 b3aa457c50f28924cc26983abb5b55227a707bab04cca427907f56f97affab86

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