pkgz v0.1.8

A fast, extensible CLI package manager in Crystal πŸ’Ž. Unified install across Apt, Flatpak, Pacstall, Pacman, Paru and more!

Pkgz Logo

Pkgz is a fast, extensible CLI tool written in Crystal πŸ’Ž for managing software packages across multiple Linux distributions.

License: RPL-v2


✨ Features

  • βœ… Install, remove, update and search apps
  • πŸ” Interactive source selection if app is available in multiple sources
  • πŸ” Automatically uses doas or sudo for privilege elevation
  • πŸ“¦ Supports:
    • Apt / Nala (Debian/Ubuntu)
    • Flatpak
    • Pacman (Arch)
    • Paru (AUR helper)
    • Yay (AUR helper)
    • DNF (Fedora/RHEL)
    • APK (Alpine)
    • Pacstall
    • Zypper (openSUSE)
    • XBPS (Void) (Untested)
    • FreeBSD & FreeBSD Ports (Untested)
    • OpenBSD & OpenBSD Ports (Untested)
  • βš™οΈ Configurable via ~/.config/pkgz/config.toml
  • 🌱 Extensible to support other package managers

πŸ“¦ Requirements

To use pkgz, you’ll need the following:

  • Privilege elevation:
    Either sudo or doas must be installed.

  • At least one supported package manager:
    Linux: apt, nala, flatpak, pacman, paru, yay, dnf, zypper, apk, xbps, or pacstall
    BSD: FreeBSD pkg, FreeBSD Ports, OpenBSD pkg, OpenBSD Ports

  • 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
yay = false
pacman = false
dnf = false
pacstall = true
zypper = false
xbps = false
freebsd = false
freebsd_ports = false
openbsd = false
openbsd_ports = false

[elevator]
command = "sudo"  # or "doas"

You only need to add the sources you will use and set them to true

Also you Must have an elevator set, either sudo or doas


πŸ›  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.8/pkgz
curl -LO https://github.com/roguehashrate/pkgz/releases/download/v0.1.8/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
mv pkgz ~/.local/bin/

Prebuilt Binary

Download from Releases:

mv pkgz ~/.local/bin
chmod +x ~/.local/bin/pkgz

Tarball (for Arch and others)

wget https://github.com/roguehashrate/pkgz/releases/download/v0.1.8/pkgz-0.1.8.tar.gz
wget https://github.com/roguehashrate/pkgz/releases/download/v0.1.8/pkgz-0.1.8.tar.gz.sha256

sha256sum -c pkgz-0.1.8.tar.gz.sha256
tar -xvf pkgz-0.1.8.tar.gz
cd pkgz
chmod +x install.sh
./install.sh

Make sure ~/.local/bin is in your PATH.


πŸš€ Usage

pkgz <install|remove|update|search|clean|info|--version> [app-name]

Examples:

pkgz install gimp
pkgz remove gimp
pkgz clean
pkgz info gimp
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 or sudo.
  • Privileged commands are run with the configured elevator command.

🧩 Extending Pkgz

To add support for a new package manager:

  1. Subclass Pkgz::Source
  2. Implement:
    • name
    • available?(app)
    • install(app)
    • remove(app)
    • update
    • search(app)
  3. Add your source to the enabled sources list and config.

Created by roguehashrate

Repository

pkgz

Owner
Statistic
  • 2
  • 0
  • 1
  • 0
  • 1
  • 26 minutes ago
  • June 23, 2025
License

Other

Links
Synced at

Tue, 23 Dec 2025 19:31:09 GMT

Languages