https://github.com/archetypum/tum-perl
Easy cross-platform UNIX scripting with Perl.
https://github.com/archetypum/tum-perl
automation bsd cross-platform gnu gnu-linux linux open-source package-management perl perl-library perl5 service-management system-management unix
Last synced: about 2 months ago
JSON representation
Easy cross-platform UNIX scripting with Perl.
- Host: GitHub
- URL: https://github.com/archetypum/tum-perl
- Owner: Archetypum
- License: lgpl-3.0
- Created: 2025-05-24T10:09:19.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-20T22:30:05.000Z (about 1 year ago)
- Last Synced: 2025-06-20T23:26:25.583Z (about 1 year ago)
- Topics: automation, bsd, cross-platform, gnu, gnu-linux, linux, open-source, package-management, perl, perl-library, perl5, service-management, system-management, unix
- Language: Perl
- Homepage: https://github.com/Archetypum
- Size: 152 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE-LGPLv3.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Authors: AUTHORS.md
Awesome Lists containing this project
README
# tum-perl

**Tum (TheUnixManager)** is a universal package management and initialization system library created by **Archetypum**, designed to simplify interaction with various UNIX-like systems and streamline the creation of system-related scripts.
This is the Perl implementation of `tum`.
---
## Why?
Because interacting with countless package managers and init systems across UNIX-like platforms is painful — `tum` fixes that.
---
## Installation
### Via CPAN (coming soon)
```sh
cpan install Tum # Coming soon!
```
### Manual Build
```sh
git clone https://github.com/Archetypum/tum-perl.git
cd tum-perl
perl Makefile.PL
make
make test
make install
```
## Supported Package Management Utilities (35)
### Debian-based:
- **apt**, **apt-get**, **apt-cache**, **apt-cdrom**, **apt-config**, **apt-extracttemplates**, **apt-listchanges**, **apt-mark**, **apt-sortpkgs**, **aptitude**, **aptitude-create-state-bundle**, **aptitude-run-state-bundle**, **dpkg**
### Arch-based:
- **pacman**, **yay**, **trizen**, **pamac**
### Gentoo-based:
- **portage** (open for pull requests)
### Slackware-based:
- **slackpkg**
### Alpine-based:
- **apk**
### Void-based:
- **xbps-install**, **xbps-remove**, **xbps-query**
### Guix-based:
- **guix**
### Dragora-based:
- **qi**
### OpenBSD/NetBSD/FreeBSD-based:
- **pkg_add**, **pkg_delete**, **pkg_create**, **pkg_info**
### FreeBSD-based:
- **pkg**
### NetBSD-based:
- **pkgin**
### RedHat-based:
- **yum**, **dnf**
### openSUSE-based:
- **zypper**, **zypper-log**
### macOS-based:
- **homebrew**
## Supported Initialization Systems (7)
- **systemd**
- **sysvinit**
- **openrc**
- **runit**
- **s6**
- **dinit**
- **launchd**
## Documentation
You can view the module documentation using **perldoc**:
```sh
perldoc lib/Tum.pm
perldoc lib/Tum/PackageManager/Apt.pm
perldoc lib/Tum/InitSystem/SysVinit.pm
```
## Example Usage
### UNIX:
```perl
#!/usr/bin/perl
use Tum qw(
get_user_distro
is_debian_based
is_arch_based
get_init_system
clear_screen
prompt_user
check_privileges
RED RESET
);
my $distro = get_user_distro();
if (is_debian_based($distro, @DEBIAN_BASED))
{
print "You are using a Debian-based distro.\n";
}
my $init = get_init_system();
print "your init system: $init\n";
```
### Service Management:
```perl
#!/usr/bin/perl
use Tum::InitSystem::OpenRC;
my $svc = Tum::InitSystem::OpenRC->new("restart", "sshd");
$svc->execute;
```
### Package Management
```perl
#!/usr/bin/perl
use Tum::PackageManager::Apt;
print "Installing packages..."
my $pm = Tum::PackageManager::Apt::apt_install("neofetch", "htop", "vrms");
```
## Other Implementations by Archetypum
- [_tum-python_](https://github.com/Archetypum/tum-python)
- [_tum-bash_](https://github.com/Archetypum/tum-bash)
- [_tum-raku_](https://github.com/Archetypum/tum-raku)
- [_tum-c_](https://github.com/Archetypum/tum-c)
- [_tum-rust_](https://github.com/Archetypum/tum-rust)
## Legal
**tum-perl** is free software, released under the **GNU Lesser General Public License v3**.
See:
- [_LICENSE-LGPLv3.md_](https://github.com/Archetypum/tum-perl/blob/master/LICENSE-LGPLv3.md)
- _https://www.gnu.org/licenses/lgpl-3.0.html_
- [_Free Software Foundation_](https://www.fsf.org/)
