skillfed

pygnuutils

A python implementation for GNU utils

pygnuutils v0.1.1 315.5K downloads/30d#7,684 on PyPI4
Copyleft license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license… (full text in the JSON record) DORMANT released

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 on this page — 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

pygnuutils on PyPI

pip

pip install pygnuutils

uv

uv add pygnuutils

poetry

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. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license… (full text in the JSON record) (copyleft)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 1 — click
Maintenance dormant — 1,190 days since the last release
Last repo commit
First released
Downloads 315,514/month — #7,684 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pygnuutils-0.1.1-py3-none-any.whl

Keywords: gnu, cli, coreutils

Development Status :: 5 - Production/StableLicense :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

gnu utils python implementationls command python librarycoreutils python alternativecli utilities pythongnu tools pure python
gnu-utilscli-wrapperdependency-injection

More Utilities packages