XPM 是一個為類 Unix 系統(包括 macOS、Linux 和實驗性 Windows 支援)設計的通用套件管理員。它可實現跨不同環境的應用程式無縫安裝、管理與分發。基於 Flutter 和 Dart 建構,XPM 簡化了相依性處理與應用程式發佈,非常適合針對多平台開發的開發者。其跨平台相容性確保在 Android、iOS、macOS、Windows 與 Linux 上行為一致。該工具旨在統一 Flutter 生態系統中的套件管理工作流程。
適用情境
跨平台應用程式部署
跨作業系統的統一套件管理
簡化應用發佈
開發工作流程自動化
CI/CD 結合
多作業系統依賴性解析
主要特色
跨類 Unix 系統的通用相容性
實驗性 Windows 支援
基於 Flutter/Dart 的架構
透過 `flutter pub add xpm` 的命令列介面
支援 Android、iOS、macOS、Windows 與 Linux
簡化應用程式打包與發行
適合對象
針對多個作業系統的開發人員
使用 CI/CD 流水線的團隊
跨平台 Flutter 應用的發行者
尋求統一工具鏈的環境維護者
開源貢獻者管理多作業系統專案
使用建議
Windows 支援仍處於實驗階段
需要 Flutter 環境設定
可用文件有限
可能需要平台特定的設定
尚未在生產環境中廣泛採用
對託管在 GitHub 上的原始碼的依賴
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
xpm - uniX Package Manager
A universal package manager for any unix-like distro including macOS. Rewritten in Rust for maximum performance and portability.
What is xpm?
XPM is a package manager for unix systems like Linux, BSD, MacOS, etc. It can be a wrapper for native package managers or a package manager itself by using its way of installing packages. For the list of packages available, see xpm-popular.
Our key values
Easy to install, update, upgrade, remove, search (and filter)
No questions asked, can run in a non-interactive way
Easy to create new installers or a full repository
Be agnostic, following unix standards and relying on very known tools
Include many popular distros, including macOS and Android (termux)
Prefer native pm way and falls back to xpm way
Features
Universal: Works on Linux (Arch, Debian, Ubuntu, Fedora, openSUSE), macOS, and Android/Termux
Fast: Built with Rust for maximum performance (~3MB static binary)
Unified: Search and install packages from XPM repositories AND native package managers
AUR Support: Full AUR helper support (paru, yay) on Arch Linux
Offline-first: Local database with cached package metadata
Script-based packages: Simple bash scripts for package installation
Supported Operating Systems & Package Managers
🎯 Integrated Support (Native PM with formatted search)
Debian/Ubuntu & derivatives → APT
Arch Linux → Pacman (with AUR support via Paru and Yay)
These systems get full native package manager integration with intelligent search, metadata extraction, and clean formatted output.
📜 Script-Based Support (via installers)
For other systems, XPM provides script-based installation through the xpm-popular repository:
Linux Distributions:
Fedora → DNF
openSUSE → Zypper
Clear Linux → swupd
Android (Termux) → pkg
Alpine Linux → via custom scripts
macOS → Homebrew (brew) - via scripts
Installation
Faster with curl
curl -fsSL install.cat/verseles/xpm
From Source
# Clone the repository
git clone https://github.com/verseles/xpm.git
cd xpm
# Build
cargo build --release
# Install to /usr/local/binsudocp target/release/xpm /usr/local/bin/
# Development build
cargo build
# Release build (optimized)
cargo build --release
# Run tests
cargo test# Run with verbose output
cargo run -- --verbose check
# Pre-commit checks (format + lint + test)
make precommit
Container Testing
Test xpm on different distributions using Podman:
# Build and test on Ubuntu
make test-ubuntu
# Build and test on Arch Linux
make test-arch
# Build and test all distros
make docker-test
# Clean container images
make docker-clean