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