sh is a subprocess replacement for Python that allows you to call any program as if it were a function.
The problem sh solves is the verbosity and complexity of Python's standard subprocess module. Instead of constructing command strings or managing Popen objects, you import a program by name and call it directly with arguments as function parameters. The tool dynamically creates callable objects for any executable in your system path, translating Python function calls into subprocess invocations with proper argument handling and output capture.
sh is suited for DevOps scripts, system administration tools, and any Python application that needs to orchestrate external programs. It works exclusively on Unix-like operating systems including Linux, macOS, and BSD variants; Windows is not supported. The tool is not a reimplementation of system commands in Python but rather a thin wrapper that makes calling existing binaries feel natural within Python code. It supports Python versions from 3.10 through 3.14 and PyPy.
Development is maintained by a single author with comprehensive test coverage across all supported Python versions using tox. The project includes full documentation available both in standard format and as a single-page reference for use with language models. Development setup is streamlined through devcontainer and GitHub Codespaces support, allowing contributors to begin working immediately without local configuration. The test suite is run through make targets and can execute individual tests or the full suite, with coverage reporting available in both terminal and HTML formats.