x apk - Alpine Linux Package Manager Enhancement
Alpine Linux is favored for its lightweight and secure design, and apk as its official package manager is equally concise and efficient. But sometimes, we want a more user-friendly interaction, easier mirror switching, and more proactive security protection. x apk is designed for this purpose, bringing you a brand new experience on top of the native apk.
Interactive Exploration: Browse Packages Like an App Store
Forget the days of memorizing exact package names! Just run x apk, and you'll enter an interactive package exploration interface (using the powerful fzf tool by default). Here, you can:
- Fuzzy Search: Type keywords in real-time to dynamically filter the package list.
- Live Preview: Select a package, and detailed information appears instantly in the right panel.
- Convenient Actions: After choosing a package, you can directly select to install or view more detailed information.
If you don't have
fzfinstalled,x-cmdwill automatically download and launchfzfwhen you executex apk, no manual pre-installation needed.
x apkThis interactive approach greatly lowers the barrier to finding and installing packages, especially useful when you're not sure of the exact package name.
One-Click Mirror Switch: Say Goodbye to Slow Downloads
In domestic network environments, connecting directly to Alpine official sources can sometimes be slow. x apk thoughtfully integrates mirror management, allowing you to easily switch to faster domestic mirrors.
Want to see what mirror sources are recommended?
x apk mirror lsAfter executing this command, you'll see a list similar to below, containing official sources and commonly used domestic mirrors like Alibaba Cloud, Huawei Cloud, Tsinghua University, etc.
Code Url Name
official dl-cdn.alpinelinux.org Official
ali mirrors.aliyun.com Alibaba Cloud
huawei mirrors.huaweicloud.com Huawei Cloud
tuna mirrors.tuna.tsinghua.edu.cn Tsinghua University
ustc mirrors.ustc.edu.cn USTC
sjtu mirrors.sjtug.sjtu.edu.cn SJTUOnce you find your preferred mirror (e.g., Tsinghua's tuna), a single command completes the switch:
x apk mirror set tunax apk automatically backs up your original configuration, modifies the /etc/apk/repositories file, and runs apk update to refresh the index. From now on, enjoy blazing-fast download speeds! To restore the official source, use x apk mirror unset.
Security Scanning: Proactive Defense, Preventing Issues Before They Happen
Software supply chain security is increasingly important. Are there known vulnerabilities in the packages installed on your system? x apk integrates osv-scanner, allowing you to conveniently scan installed packages and their dependencies for security flaws.
x apk osvThis command analyzes the /lib/apk/db/installed file and submits the list of installed packages to OSV-Scanner for detection. After scanning, it reports any potential vulnerabilities found, helping you assess risks and take appropriate actions (such as upgrading packages) in a timely manner. This is crucial for maintaining system security.
TIP
x apk greatly enhances the native apk experience through its interactive interface, convenient mirror management, and integrated security scanning. Whether you're new to Alpine or a long-time user, x apk helps you manage your packages more efficiently and securely. Give it a try!
Help us make these docs great!
All X-CMD docs are generated from command help and multiple data sources. See something that's wrong or unclear? Feel free to let us know through any of these ways~