pkgz v0.1.4
Pkgz is a fast, extensible CLI tool written in Crystal π for managing software packages across multiple Linux distributions.
β¨ Features
- β Install, remove, update and search apps
- π Interactive source selection if app is available in multiple sources
- π Automatically uses
doas
orsudo
for privilege elevation - π¦ Supports:
- Apt / Nala (Debian/Ubuntu)
- Flatpak
- Pacman (Arch)
- Paru (AUR helper)
- DNF (Fedora/RHEL)
- Pacstall
- FreeBSD & FreeBSD Ports
- OpenBSD & OpenBSD Ports
- βοΈ Configurable via
~/.config/pkgz/config.toml
- π± Extensible to support other package managers
π¦ Requirements
To use pkgz, youβll need the following:
-
Privilege elevation:
Eithersudo
ordoas
must be installed -
At least one supported package manager:
apt
,nala
,pacman
,paru
,dnf
, orpacstall
-
Crystal compiler:
Only needed if you're building from source
(Prebuilt binaries donβt require Crystal)
βοΈ Configuration
Create or edit ~/.config/pkgz/config.toml
:
[sources]
apt = true
nala = false
flatpak = true
paru = false
pacman = false
dnf = false
pacstall = true
freebsd = false
freebsd_ports = false
openbsd = false
openbsd_ports = false
[elevator]
command = "sudo" # or "doas"
This controls enabled sources and privilege elevator. If missing, Pkgz will prompt and exit.
π Installation
π§ͺ Recommended: One-liner Install (Linux x86_64)
You can install the latest prebuilt binary directly with:
curl -sS https://raw.githubusercontent.com/roguehashrate/pkgz/main/install.sh | bash
This installs pkgz
to ~/.local/bin
.
Make sure ~/.local/bin
is in your $PATH
.
π Verify Download (Optional)
To verify the integrity of the binary:
curl -LO https://github.com/roguehashrate/pkgz/releases/download/v0.1.4/pkgz
curl -LO https://github.com/roguehashrate/pkgz/releases/download/v0.1.4/pkgz.sha256
sha256sum -c pkgz.sha256
Build from Source
git clone https://github.com/roguehashrate/pkgz
cd pkgz
crystal build src/pkgz.cr --release -o pkgz
sudo mv pkgz /usr/local/bin/
Debian .deb
Package
wget https://github.com/roguehashrate/pkgz/releases/download/v0.1.4/pkgz-0.1.4.deb
sudo dpkg -i pkgz-0.1.4.deb
sudo apt-get install -f # Fix dependencies if needed
Prebuilt Binary
Download from Releases:
sudo mv pkgz /usr/local/bin/
sudo chmod +x /usr/local/bin/pkgz
Tarball (for Arch and others)
wget https://github.com/roguehashrate/pkgz/releases/download/v0.1.4/pkgz-0.1.4-x86_64.tar.gz
tar -xvf pkgz-0.1.4-x86_64.tar.xz
sudo cp pkgz-0.1.4/usr/bin/pkgz /usr/bin/
Or install locally:
mkdir -p ~/.local/bin
cp pkgz-0.1.4/usr/bin/pkgz ~/.local/bin/
Make sure ~/.local/bin
is in your PATH.
π¦ Pacstall Support & Local Installation
pkgz
supports installing packages via Pacstall, a universal package manager for Linux.
-
Ensure Pacstall is installed on your system. For installation instructions, visit https://pacstall.dev/
-
Install the local
.pacstall
package file using:
pacstall -I /path/to/pkgz.pacstall
This will install pkgz
without needing to publish the package remotely.
Afterward, you can use pkgz
as usual to manage software packages across supported sources.
The pacstall file will likely always be ahead of the pacstall repos.
π Usage
pkgz <install|remove|update|search|--version> [app-name]
Examples:
pkgz install gimp
pkgz remove neofetch
pkgz update
pkgz --version
Sample output:
$ pkgz install gimp
π Searching for 'gimp' in sources...
π¦ Found 'gimp' in multiple sources:
1. APT
2. Flatpak
Which one would you like to use? [1-2]: 2
π Installing with Flatpak...
π Privilege Elevation
- Automatically detects and uses
doas
orsudo
. - Privileged commands are run with the configured elevator command.
π§© Extending Pkgz
To add support for a new package manager:
- Subclass
Pkgz::Source
- Implement:
name
available?(app)
install(app)
remove(app)
update
- Add your source to the enabled sources list and config.
πͺͺ License
MIT License
Created by roguehashrate
pkgz
- 0
- 0
- 0
- 0
- 1
- 4 days ago
- June 23, 2025
MIT License
Sat, 05 Jul 2025 05:25:06 GMT