$npx skillfedfor your agent

sh

Python subprocess replacement

Worth itPyPI Python ModulesReleased Jul 202612.2M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — sh-2.4.0-py3-none-any.whl
v2.4.0 · released 2026-07-25 · Python <4.0,>=3.10

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.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Unix-like operating system required (Linux, macOS, BSD); Windows is not supported.
  • Low friction—pure Python wheel with no runtime dependencies.
  • Actively maintained with a recent release (20 days ago) and 7245 repository stars.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

last release 2026-07-25 (20 days) · last repo commit 2026-07-25 · 7,245 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 12,232,375 downloads/mo, #1,334 on PyPI

Verify before relying

pip install sh

from sh import git
print(git("status", "--short"))
  • Whether the package handles shell metacharacters and escaping automatically or requires manual quoting.
  • Performance characteristics compared to subprocess.run() for high-volume command execution.
  • Behavior when called programs write to stderr or exit with non-zero status codes.
Same gist for agents: .md · .json

What it is and 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.

It 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.

Use it for

  • 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.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

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.

Install

sh on PyPI

Before you install

Low friction—pure Python wheel with no runtime dependencies. Actively maintained with a recent release (20 days ago) and 7245 repository stars.

Unix-like operating system required (Linux, macOS, BSD); Windows is not supported.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install sh

from sh import git
print(git("status", "--short"))

Verify before relying

  • Whether the package handles shell metacharacters and escaping automatically or requires manual quoting.
  • Performance characteristics compared to subprocess.run() for high-volume command execution.
  • Behavior when called programs write to stderr or exit with non-zero status codes.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4.0,>=3.10
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 20 days since the last release
Last repo commit
First released
Downloads12,232,375 / month, #1,334 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Build ToolsTopic :: Software Development :: Libraries :: Python Modules

Evidence: sh-2.4.0-py3-none-any.whl

Tags

Capabilities
subprocess replacementcall unix commands from pythonshell command wrapperpython subprocess alternativeexecute external programsunix system calls pythoncommand line interface wrapper
Topics
subprocessunix-onlycli-wrapper

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “subprocess replacement”

  • shCalls any Unix program as a Python function, replacing subprocess…
  • subprocess32A backport of Python 3's subprocess module to Python 2, with…
  • subprocess-teeA drop-in replacement for subprocess.run that captures output while…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also EasyProcess · subprocess-tee · runs · executor · subprocess.run · ptyprocess · subprocess-multitee · subprocess32 · fabric · sarge