.screens | ||
pkg_manager | ||
.gitignore | ||
go.mod | ||
go.sum | ||
main.go | ||
Makefile | ||
README.md |
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
-
Clone the repository and enter the directory:
git clone https://git.supernets.org/e/upm-universalpackagemanager
cd upm-universalpackagemanager
-
Install dependencies:
go mod download
-
Build the binary:
go build -o upm
-
(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
Source Code Search
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.