Shellingham: Tool to Detect Surrounding Shell
Shellingham is a Python library designed to detect the current shell environment, aiding in tasks like shell completion. The latest version is 1.5.4, released on March 28, 2026. It is actively maintained with a release cadence of approximately one release every few months.
Warnings
- breaking Version 1.5.0 introduced a breaking change in the detect_shell function's return type, which now returns a tuple instead of a single string.
- deprecated The 'get_shell' function is deprecated as of version 1.5.0 and will be removed in a future release.
Install
-
pip install shellingham
Imports
- detect_shell
from shellingham import detect_shell
Quickstart
from shellingham import detect_shell
shell, path = detect_shell()
print(f"Detected shell: {shell}")