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
.
Because interacting with countless package managers and init systems across UNIX-like platforms is painful — tum
fixes that.
cpan install Tum # Coming soon!
git clone https://github.com/Archetypum/tum-perl.git
cd tum-perl
perl Makefile.PL
make
make test
make install
- 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
- pacman, yay, trizen, pamac
- portage (open for pull requests)
- slackpkg
- apk
- xbps-install, xbps-remove, xbps-query
- guix
- qi
- pkg_add, pkg_delete, pkg_create, pkg_info
- pkg
- pkgin
- yum, dnf
- zypper, zypper-log
- homebrew
-
systemd
-
sysvinit
-
openrc
-
runit
-
s6
-
dinit
-
launchd
You can view the module documentation using perldoc:
perldoc lib/Tum.pm
perldoc lib/Tum/PackageManager/Apt.pm
perldoc lib/Tum/InitSystem/SysVinit.pm
#!/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";
#!/usr/bin/perl
use Tum::InitSystem::OpenRC;
my $svc = Tum::InitSystem::OpenRC->new("restart", "sshd");
$svc->execute;
#!/usr/bin/perl
use Tum::PackageManager::Apt;
print "Installing packages..."
my $pm = Tum::PackageManager::Apt::apt_install("neofetch", "htop", "vrms");
tum-perl is free software, released under the GNU Lesser General Public License v3.
See: