https://github.com/junaid433/py-coreutils
The Modern, Cross-Platform Python Rewrite of GNU Coreutils
https://github.com/junaid433/py-coreutils
cli command-line coreutils cross-platform developer-tools gnu hacktoberfest linux open-source python scripting shell sysadmin tools utilities
Last synced: 4 months ago
JSON representation
The Modern, Cross-Platform Python Rewrite of GNU Coreutils
- Host: GitHub
- URL: https://github.com/junaid433/py-coreutils
- Owner: Junaid433
- License: gpl-3.0
- Created: 2025-07-28T19:27:20.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-08-26T21:06:03.000Z (6 months ago)
- Last Synced: 2025-08-27T05:54:53.138Z (6 months ago)
- Topics: cli, command-line, coreutils, cross-platform, developer-tools, gnu, hacktoberfest, linux, open-source, python, scripting, shell, sysadmin, tools, utilities
- Language: Python
- Homepage:
- Size: 138 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# πβ¨ PY-CoreUtils
**The Modern, Cross-Platform Python Port of GNU Coreutils**
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://www.python.org/)
[](https://github.com/Junaid433/PY-CoreUtils/actions)
[](https://github.com/Junaid433/PY-CoreUtils/issues)
[](CONTRIBUTING.md)
---
> **β¨ Unix CLI power, Pythonic flexibility. Run coreutils anywhere.**
---
## π Why PY-CoreUtils?
- π₯οΈ **Cross-platform**: Linux, macOS, Windows β no C toolchain needed.
- π§© **Drop-in CLI tools**: Familiar commands, same flags, same output.
- π **Pure Python**: No dependencies, hackable, readable, and extendable.
- π‘ **Great for scripting, teaching, and dev environments**.
- π₯ **Modern code, modern vibes**.
---
## π οΈ Quick Start
```bash
# Clone and run any tool instantly!
git clone https://github.com/Junaid433/PY-CoreUtils.git
cd PY-CoreUtils
python src/mkdir.py --help
python src/rm.py --help
python src/date.py --help
python src/nproc.py --help
python src/hostid.py --help
python src/hostname.py --help
python src/id.py --help
python src/users.py --help
python src/uptime.py --help
python src/yes.py --help
```
---
## π§βπ» Coreutils, Python Style
| Command | Status | | Command | Status |
| ------------ | ------ |--| ------------ | ------ |
| `basename` | β
| | `cat` | β
|
| `chcon` | β
| | `chmod` | β³ |
| `date` | β
| | `echo` | β
|
| `hostid` | β
| | `hostname` | β
|
| `id` | β
| | `kill` | β
|
| `mkdir` | β
| | `nproc` | β
|
| `pwd` | β
| | `rm` | β
|
| `sleep` | β
| | `tee` | β
|
| `touch` | β
| | `uptime` | β
|
| `users` | β
| | `whoami` | β
|
| `yes` | β
| | `chgrp` | β³ |
| `chown` | β³ | | `chroot` | β³ |
| `cksum` | β³ | | `comm` | β³ |
| `cp` | β³ | | `csplit` | β³ |
| `cut` | β³ | | `dd` | β³ |
| `df` | β³ | | `dir` | β³ |
| `dircolors` | β³ | | `dirname` | β³ |
| `du` | β³ | | `env` | β³ |
| `expand` | β³ | | `expr` | β³ |
| `factor` | β³ | | `false` | β³ |
| `fmt` | β³ | | `fold` | β³ |
| `groups` | β³ | | `head` | β³ |
| `install` | β³ | | `join` | β³ |
| `link` | β³ | | `ln` | β³ |
| `logname` | β³ | | `ls` | β³ |
| `md5sum` | β³ | | `mkfifo` | β³ |
| `mknod` | β³ | | `mktemp` | β³ |
| `mv` | β³ | | `nice` | β³ |
| `nl` | β³ | | `nohup` | β³ |
| `numfmt` | β³ | | `od` | β³ |
| `paste` | β³ | | `pathchk` | β³ |
| `pinky` | β³ | | `pr` | β³ |
| `printenv` | β³ | | `printf` | β³ |
| `ptx` | β³ | | `readlink` | β³ |
| `realpath` | β³ | | `rmdir` | β³ |
| `runcon` | β³ | | `seq` | β³ |
| `sha1sum` | β³ | | `sha224sum` | β³ |
| `sha256sum` | β³ | | `sha384sum` | β³ |
| `sha512sum` | β³ | | `shred` | β³ |
| `shuf` | β³ | | `sort` | β³ |
| `split` | β³ | | `stat` | β³ |
| `stdbuf` | β³ | | `stty` | β³ |
| `sum` | β³ | | `sync` | β³ |
| `tac` | β³ | | `tail` | β³ |
| `tee` | β
| | `test` | β³ |
| `timeout` | β³ | | `tr` | β³ |
| `true` | β³ | | `tsort` | β³ |
| `tty` | β³ | | `uname` | β³ |
| `unexpand` | β³ | | `uniq` | β³ |
| `unlink` | β³ | | `vdir` | β³ |
| `wc` | β³ | | `who` | β³ |
---
π CLI Demos (click to expand)
```bash
$ python src/rm.py -rf build/
$ python src/date.py ">'+%Y-%m-%d %H:%M:%S'
$ python src/mkdir.py -p src/utils
$ python src/pwd.py
$ python src/basename.py /usr/bin/python3
$ python src/echo.py -e "Hello\nWorld!"
$ python src/nproc.py --all
$ python src/nproc.py --ignore=2
$ python src/sleep.py 2m
$ python src/kill.py -l
$ python src/kill.py -s HUP 5678
$ python src/hostid.py
$ python src/hostname.py
$ python src/id.py
$ python src/users.py
$ python src/uptime.py
$ python src/yes.py "y" | head -n 5
```
---
## β¨ What Makes This Cool?
- **Full GNU-style CLI**: All major flags, help/version, error codes.
- **Logical/Physical path handling**: `pwd` supports -L/-P, symlinks, POSIXLY_CORRECT.
- **Date/time power**: `date` supports parsing, formatting, reference file, UTC, batch, and more.
- **Safe & robust**: `rm` has interactive, force, and recursive modes.
- **No C, no build, no nonsense**: Just Python.
- **100% pytest coverage** and [GitHub Actions](https://github.com/Junaid433/PY-CoreUtils/actions) CI.
---
## π [Full Usage, Features & Architecture β](docs/usage.md)
- [Usage Examples](docs/usage.md)
- [Features](docs/features.md)
- [Project Architecture](docs/architecture.md)
---
## πΊοΈ Roadmap & Vision
- [ ] More GNU tools: `ls`, `cp`, `mv`, `cat`, `head`, `tail`, `chmod`, ...
- [ ] Windows/macOS-specific improvements
- [ ] More docs, more examples, more tests
- [ ] Community-driven features (your ideas here!)
---
## π¬ Get Involved!
> **We welcome all contributorsβnew and experienced!**
>
> - [Contributing Guide](CONTRIBUTING.md)
> - [Code of Conduct](CODE_OF_CONDUCT.md)
> - [Security Policy](SECURITY.md)
> - [Open Issues](https://github.com/Junaid433/PY-CoreUtils/issues)
> - [Discussions](https://github.com/Junaid433/PY-CoreUtils/discussions)
Star β the repo, share it, and help us build the best Python-powered coreutils!
---
## π‘ Did you know?
> You can use PY-CoreUtils as a teaching tool, a scripting Swiss Army knife, or even as a base for your own Python CLI projects. Fork it, hack it, and make it yours!
---
## π License
[GNU GPL v3 or later](https://www.gnu.org/licenses/gpl-3.0.html)
---
π‘ Hack, learn, and build with Python-powered coreutils!