{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/3"},{"label":"Build Tools","url":"https://skillfed.io/packages/category/software-development-build-tools"}],"enrichment":{"capability":"Calls any Unix program as a Python function, replacing subprocess with a simpler interface that treats external commands as callable objects.","skillfed_tags":["subprocess","unix-only","cli-wrapper"],"use_cases":["Automating git workflows in deployment or CI scripts by calling git commands directly as functions.","Building command-line tools that orchestrate multiple system utilities without subprocess boilerplate.","Writing system administration scripts that invoke tools like grep, sed, or find with natural Python syntax.","Testing shell scripts or system behavior from Python test suites by invoking the actual programs.","Capturing and processing output from external programs in data pipelines or build systems."],"what_it_does":"sh is a subprocess wrapper that lets you import and call Unix programs directly as Python functions, eliminating the need to construct command strings or manage subprocess objects manually. Instead of writing subprocess code, you write `from sh import git; git('status', '--short')`. The package is designed for Unix-like systems only (Linux, macOS, BSD) and does not support Windows.\n\nIt works by dynamically creating callable objects that map to system programs and handling the underlying process spawning, argument passing, and output capture. With no external dependencies and a pure-Python implementation, it installs cleanly and runs on Python 3.10 through 3.14 and PyPy. The interface is intentionally simple: it is not a reimplementation of Unix tools in Python, but a thin layer that makes calling existing programs feel native to Python code.","worth_installing":"Yes. sh is actively maintained, has no dependencies, installs with low friction, carries no known vulnerabilities, and solves a real pain point in subprocess handling. Install it if you regularly call Unix programs from Python and prefer a cleaner syntax than subprocess. Not applicable on Windows."},"id":"sh","links":{"html":"https://skillfed.io/packages/sh","md":"https://skillfed.io/packages/sh.md","pypi":"https://pypi.org/project/sh/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-25","license_spdx":null,"license_treatment":"permissive","name":"sh","python_support":"supports_current","summary":"Python subprocess replacement"},"popularity":{"monthly_downloads":12232375,"position":1334,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.4.0"}
