Universal Package Manager
Go to file
2025-01-22 00:38:25 +00:00
.screens pretty 2025-01-21 18:10:48 -05:00
pkg_manager added github source search functionality 2025-01-21 18:51:38 -05:00
.gitignore Init commit 2025-01-21 16:59:43 -05:00
go.mod added github source search functionality 2025-01-21 18:51:38 -05:00
go.sum added github source search functionality 2025-01-21 18:51:38 -05:00
main.go added github source search functionality 2025-01-21 18:51:38 -05:00
Makefile Init commit 2025-01-21 16:59:43 -05:00
README.md Update README.md 2025-01-22 00:38:25 +00:00

Universal Package Manager (UPM)

Note: This is buggy as hell I am sure of it - works for xbps and apt pretty well. Please place issues here and add to shit with PRs if you want.

A unified command-line interface for managing packages across different Linux distributions. UPM provides a consistent interface for package management operations regardless of the underlying package manager (apt, dnf, pacman, etc.).

Features

  • 🔄 Universal syntax across package managers
  • 📦 Support for multiple package managers:
    • apt (Debian/Ubuntu)
    • dnf/yum (RHEL/Fedora)
    • pacman (Arch)
    • zypper (openSUSE)
    • apk (Alpine)
    • xbps (Void Linux)
    • emerge (Gentoo)
  • 🚀 Support for universal package managers:
    • snap
    • flatpak
  • 🔍 Version-specific package installation
  • 📋 Repository management
  • 🧹 Cache cleaning
  • 🔗 Dependency handling

Installation

Prerequisites

  • Go 1.22 or newer
  • Git

Building from Source

  1. Clone the repository and enter the directory:

    git clone https://git.supernets.org/e/upm-universalpackagemanager cd upm-universalpackagemanager

  2. Install dependencies:

    go mod download

  3. Build the binary:

    go build -o upm

  4. (Optional) Install system-wide:

    sudo mv upm /usr/local/bin/

Usage

Basic Commands

Install packages:
upm install nginx
upm install nginx@1.18.0 # Install specific version

Remove packages:
upm remove nginx

Search for packages:
upm search nginx

Search for source code:
upm source nginx # Search GitHub for source code repositories

Update package lists:
upm update

Upgrade installed packages:
upm upgrade

List installed packages:
upm list

Show package information:
upm info nginx

Repository Management

Add a repository:
upm repo add https://repo.example.com

Remove a repository:
upm repo remove example-repo

List repositories:
upm repo list

Maintenance

Clean package cache:
upm clean

Remove unused dependencies:
upm autoremove

Dependency Management

Check dependencies:
upm check-deps

Check dependencies for specific package:
upm check-deps nginx

Show package dependencies:
upm show-deps nginx

Using Universal Package Managers

Install using snap:
upm -u snap install firefox

Install using flatpak:
upm -u flatpak install org.mozilla.firefox

Search for source code repositories: upm source nginx

This command searches GitHub for source code repositories related to the specified package.

Project Structure

upm-universalpackagemanager/
├── main.go              # Main application entry point
├── pkg_manager/
│   └── pkg_manager.go   # Core package manager implementation
├── go.mod
├── go.sum
└── README.md

Dependencies

Required Go packages:

  • github.com/fatih/color - For colorized terminal output
  • github.com/briandowns/spinner - For progress indicators

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Supernets, PP4L, DigitalGangster

Support

If you encounter any issues or have questions, please file an issue on the git.supernets.org repository.