unipm is a cross-platform command-line tool that simplifies software installation with natural commands. It automatically detects your OS and package manager, resolves package names, and executes the correct installation command β all while maintaining transparency and safety.
Linux/macOS:
curl -fsSL https://raw.githubusercontent.com/ieee-cs-bmsit/unipm/main/scripts/install.sh | bashWindows (PowerShell):
iwr -useb https://raw.githubusercontent.com/ieee-cs-bmsit/unipm/main/scripts/install.ps1 | iexOr download binaries directly from releases.
- Unified Syntax: One command works across all platforms
- Auto-Detection: Automatically detects OS, distribution, and package manager
- Fuzzy Matching: Intelligent package name resolution with suggestions
- Safety First: Dry-run mode, confirmation prompts, and input sanitization
- Cross-Platform: Linux, macOS, and Windows support
- Extensible: JSON-based package knowledge base
Linux/macOS:
git clone https://github.com/ieee-cs-bmsit/unipm.git
cd unipm
chmod +x scripts/build.sh
./scripts/build.sh
sudo make install -C buildWindows:
git clone https://github.com/ieee-cs-bmsit/unipm.git
cd unipm
.\scripts\build.ps1
# Copy build\bin\Release\unipm.exe to a directory in your PATH# Install packages
unipm install docker
unipm install node lts
unipm install vscode python git
# Remove packages
unipm remove nginx
# Update all packages
unipm update
# Search for packages
unipm search postgres
# Show package info
unipm info docker
# Dry run (preview command)
unipm install redis --dry-run
# Skip confirmation prompts
unipm install mongodb --yes
# Force specific package manager
unipm install docker --pm=brew- APT (Debian, Ubuntu)
- Pacman (Arch Linux)
- Homebrew (macOS, Linux)
- DNF (Fedora, RHEL, CentOS)
- Winget (Windows 10/11)
- Chocolatey (Windows)
- Developer Environment Setup: Quickly install dev tools across different machines
- Linux Onboarding: Help new users without package manager knowledge
- CI/CD Automation: Standardize installation scripts across platforms
- Educational Labs: Simplify software installation for students
unipm install docker- Ubuntu:
sudo apt install -y docker.io - Arch:
sudo pacman -S --noconfirm docker - macOS:
brew install docker - Windows:
winget install --id Docker.DockerDesktop
unipm install node lts- Homebrew:
brew install node@lts - Winget:
winget install --id OpenJS.NodeJS.LTS
unipm install postgres --dry-run
# Output: Would execute: sudo apt install -y postgresqlunipm uses a JSON package database located at:
- Linux:
/usr/local/share/unipm/packages.json - macOS:
/usr/local/share/unipm/packages.json - Windows:
C:\Program Files\unipm\packages.json
You can extend the database with custom mappings at:
- Linux/macOS:
~/.config/unipm/packages.json - Windows:
%APPDATA%\unipm\packages.json
{
"packages": {
"myapp": {
"aliases": ["my-application"],
"apt": "myapp-deb",
"pacman": "myapp",
"brew": "myapp-formula"
}
}
}unipm follows a modular three-layer architecture:
- Parsing Layer: Command-line argument parsing and validation
- Resolution Layer: Package name fuzzy matching and alias resolution
- Execution Layer: Safe command execution with privilege escalation
See ARCHITECTURE.md for detailed design documentation.
cd build
ctestContributions are welcome! Please feel free to submit pull requests or open issues.
See CONTRIBUTING.md for details on how to get started.
- Code of Conduct: We differ to the Contributor Covenant to ensure a welcoming community.
- Security: Please review our Security Policy for reporting vulnerabilities.
Edit data/packages.json:
{
"newpackage": {
"aliases": ["alternative-name"],
"apt": "package-name-for-apt",
"pacman": "package-name-for-pacman",
"brew": "package-name-for-brew",
"dnf": "package-name-for-dnf",
"winget": "Publisher.PackageName",
"choco": "package-name"
}
}- Create adapter in
src/adapters/yourpm_adapter.cpp - Implement
PackageManagerAdapterinterface - Add to
AdapterFactory::create() - Update
PackageManagerenum intypes.h
MIT License - see LICENSE file for details
- Inspired by the universal package manager concept
- Uses nlohmann/json for JSON parsing
unipm is a convenience wrapper around native package managers. It does not replace them and requires them to be installed on your system. Always review commands before execution using --dry-run.