---
id: pygnuutils
version: "0.1.1"
license: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license… (full text in the JSON record)
license_treatment: copyleft
maintenance: dormant
---
# pygnuutils — A python implementation for GNU utils
License: copyleft · Maintenance: dormant · Downloads: 315.5K/mo
## What it is and what it does
pygnuutils is a pure Python reimplementation of GNU utility commands, allowing you to call familiar tools like `ls` either from the command line (via a `pygnuutils` prefix) or directly from Python code. The main appeal is its support for dependency injection—you can subclass the utility's internal stub to intercept and customize behavior (like logging symlink resolution) without modifying the core implementation.
The package depends only on click for CLI handling and supports Python 3.7 through 3.11. It is marked as Production/Stable but has not been updated since May 2023, making it suitable for stable, low-change use cases but not for active development where you need ongoing maintenance or new GNU utility additions.
Use it for:
- Call GNU utilities from Python code without shelling out, using ls() with custom options
- Inject custom behavior into file operations (e.g., logging, filtering, or mocking symlink resolution)
- Build CLI tools that wrap or extend GNU utilities with Python-specific logic via the click integration
- Test code that depends on GNU utilities by mocking their behavior through dependency injection
## Worth the install?
AI-flagged interpretation of the facts above — verify before relying.
Provides pure Python implementations of GNU utility commands (like `ls`) that can be used as CLI tools or imported as libraries with dependency injection support.
Yes, if you need a stable, lightweight Python wrapper around GNU utilities with dependency injection for testing or customization. The low install friction and lack of security vulnerabilities support this. However, the dormant maintenance status (no updates since May 2023) means you should verify that the utilities you need are already implemented and that you're comfortable with no active support for new features or GNU utility additions.
## Install
pip install pygnuutils
uv add pygnuutils
poetry add pygnuutils
## Installing pygnuutils
Before you install: Low friction install with a single runtime dependency (click). Dormant maintenance since May 2023 with no recent commits, though the repository remains active and unarchived.
License in practice: Licensed under GPLv3+, a copyleft license requiring that any distributed modifications or derivative works also be released under GPLv3+. Suitable for open-source projects but restricts use in proprietary software.
Quickstart:
pip install pygnuutils
from pygnuutils.ls import Ls
ls = Ls()
ls('/tmp', all_=True)
Verify before relying:
- Which GNU utilities beyond ls are currently implemented in this version
- Whether the dependency injection pattern is documented with examples beyond the readlink use case
- Current test coverage and whether the implementation handles all standard GNU utility flags
## Package facts
- License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license… (full text in the JSON record) (copyleft)
- Python support: supports_current
- Install friction: low
- Maintenance: dormant
- Downloads: 315.5K/month (top 15,000 on PyPI)
- Known vulnerabilities: none known
## Tags
gnu utils python implementation, ls command python library, coreutils python alternative, cli utilities python, gnu tools pure python, gnu-utils, cli-wrapper, dependency-injection
[View on SkillFed](https://skillfed.io/packages/pygnuutils) · [View on PyPI](https://pypi.org/project/pygnuutils/)