shebang-command reliably extracts the command from a shebang line in a file. Useful for determining the interpreter specified at the beginning of executable scripts. It handles various shebang formats and gracefully falls back if no shebang is present. A lightweight and dependency-free package, shebang-command, helps developers and tools accurately identify script execution environments.