2025-01-21 21:59:43 +00:00
# Universal Package Manager (UPM)
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:
2025-01-21 22:06:54 +00:00
```git clone https://git.supernets.org/e/managerofmanagers```
```cd upm```
2025-01-21 21:59:43 +00:00
2. Install dependencies:
2025-01-21 22:06:54 +00:00
```go mod download```
2025-01-21 21:59:43 +00:00
3. Build the binary:
2025-01-21 22:06:54 +00:00
```go build -o upm```
2025-01-21 21:59:43 +00:00
4. (Optional) Install system-wide:
2025-01-21 22:06:54 +00:00
```sudo mv upm /usr/local/bin/```
2025-01-21 21:59:43 +00:00
## Usage
### Basic Commands
2025-01-21 22:06:54 +00:00
Install packages:\
```upm install nginx```\
```upm install nginx@1.18.0 # Install specific version```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
Remove packages:\
```upm remove nginx```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
Search for packages:\
```upm search nginx```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
Update package lists:\
```upm update```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
Upgrade installed packages:\
```upm upgrade```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
List installed packages:\
```upm list```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
Show package information:\
```upm info nginx```
2025-01-21 21:59:43 +00:00
### Repository Management
2025-01-21 22:06:54 +00:00
Add a repository:\
```upm repo add https://repo.example.com```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
Remove a repository:\
```upm repo remove example-repo```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
List repositories:\
```upm repo list```
2025-01-21 21:59:43 +00:00
### Maintenance
2025-01-21 22:06:54 +00:00
Clean package cache:\
```upm clean```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
Remove unused dependencies:\
```upm autoremove```
2025-01-21 21:59:43 +00:00
### Dependency Management
2025-01-21 22:06:54 +00:00
Check dependencies:\
```upm check-deps```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
Check dependencies for specific package:\
```upm check-deps nginx```
Show package dependencies:\
```upm show-deps nginx```
2025-01-21 21:59:43 +00:00
### Using Universal Package Managers
2025-01-21 22:06:54 +00:00
Install using snap:\
```upm -u snap install firefox```
2025-01-21 21:59:43 +00:00
2025-01-21 22:06:54 +00:00
Install using flatpak:\
```upm -u flatpak install org.mozilla.firefox```
2025-01-21 21:59:43 +00:00
## Project Structure
2025-01-21 22:06:54 +00:00
```
2025-01-21 21:59:43 +00:00
upm/
├── main.go # Main application entry point
├── pkg_manager/
│ └── pkg_manager.go # Core package manager implementation
├── go.mod
├── go.sum
└── README.md
2025-01-21 22:06:54 +00:00
```
2025-01-21 21:59:43 +00:00
## 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
- Thanks to all the Linux distribution maintainers for their package managers
- The Go community for the excellent standard library and third-party packages
## Support
If you encounter any issues or have questions, please file an issue on the GitHub repository.