A fast, cross-platform universal package manager that auto-detects your system.
curl -fsSL https://raw.githubusercontent.com/broisnischal/zap/master/install.sh | bashcurl -fsSL https://raw.githubusercontent.com/broisnischal/zap/master/install.sh | bash -s v0.0.5Download the latest release for your platform from GitHub Releases:
| Platform | Architecture | Download |
|---|---|---|
| Linux | x86_64 | zap-x86_64-unknown-linux-gnu.tar.gz |
| Linux | ARM64 | zap-aarch64-unknown-linux-gnu.tar.gz |
| macOS | Intel | zap-x86_64-apple-darwin.tar.gz |
| macOS | Apple Silicon | zap-aarch64-apple-darwin.tar.gz |
| FreeBSD | x86_64 | zap-x86_64-unknown-freebsd.tar.gz |
# Example: Linux x86_64
curl -LO https://github.com/broisnischal/zap/releases/latest/download/zap-x86_64-unknown-linux-gnu.tar.gz
tar -xzf zap-x86_64-unknown-linux-gnu.tar.gz
sudo mv zap /usr/local/bin/To install globally on Windows, run PowerShell as Administrator and execute:
$dest = "$env:ProgramFiles\zap"
New-Item -ItemType Directory -Force -Path $dest | Out-Null
Invoke-WebRequest https://github.com/broisnischal/zap/releases/latest/download/zap-x86_64-pc-windows-msvc.zip -OutFile zap.zip
Expand-Archive zap.zip -DestinationPath $dest -Force
Remove-Item zap.zip
setx PATH "$($env:PATH);$dest"Restart your terminal and zap.exe will be available everywhere (e.g., zap system).
# Clone the repository
git clone https://github.com/broisnischal/zap.git
cd zap
# Build and install
cargo install --path . --force| System | Package Manager | Backend Flag | Status |
|---|---|---|---|
| Arch Linux | pacman + AUR | -b aur |
✅ Full support |
| Arch Linux | pacman (repos only) | -b pacman |
✅ Full support |
| Manjaro | pacman + AUR | -b aur |
✅ Full support |
| EndeavourOS | pacman + AUR | -b aur |
✅ Full support |
| Debian | APT | -b apt |
✅ Full support |
| Ubuntu | APT | -b apt |
✅ Full support |
| Linux Mint | APT | -b apt |
✅ Full support |
| Pop!_OS | APT | -b apt |
✅ Full support |
| Fedora | DNF | -b dnf |
✅ Full support |
| RHEL/CentOS | DNF | -b dnf |
✅ Full support |
| Rocky Linux | DNF | -b dnf |
✅ Full support |
| AlmaLinux | DNF | -b dnf |
✅ Full support |
| openSUSE | zypper | -b zypper |
✅ Full support |
| SUSE Linux | zypper | -b zypper |
✅ Full support |
| FreeBSD | pkg | -b pkg |
✅ Full support |
| macOS | Homebrew | -b brew |
✅ Full support |
| Windows 10/11 | winget / Scoop / Chocolatey | -b winget, -b scoop, -b choco |
✅ Full support |
| Package Manager | Backend Flag | Status |
|---|---|---|
| Flatpak | -b flatpak |
✅ Full support |
| Snap | -b snap |
✅ Full support |
| Language | Package Manager | Backend Flag | Status |
|---|---|---|---|
| Python | pip | -b pip |
✅ Full support |
| Rust | Cargo | -b cargo |
✅ Full support |
| Go | go install | -b go |
✅ Full support |
| Node.js | npm | -b npm |
✅ Full support |
- ⚡ Auto-Detection - Automatically detects your OS and uses the right package manager
- 🔍 Smart Search - Search packages with live interactive results
- 📦 Unified Interface - Same commands work across 12+ package managers
- 🎨 Beautiful UI - Colorful, interactive terminal interface
- 🔄 Multi-Backend - Switch between package managers with
-bflag - 🌍 Cross-Platform - Works on Linux, macOS, FreeBSD, and more
- 🧰 Self-Bootstrapping - Installs missing package managers (winget/scoop/choco) and runtimes (Python for pip) on demand
# Install packages directly (uses auto-detected backend)
zap package1 package2 package3
# Install from a specific backend — the first word can be any backend name
zap flatpak install package1
zap pip install numpy pandas
zap npm install typescript eslint
zap brew install wget # same as: zap -b brew install wget# Start interactive live search
zap
# Interactive mode on a specific backend
zap aur
zap npm
zap cargoIn interactive mode:
- Autocomplete suggestions: Popular developer tools (tmux, vim, git, etc.) are shown when the search is empty
- Type to search (minimum 2 characters for backend search)
Space/Tab- Select/deselect package (Shift+Tab selects upward)Ctrl+A- Select all / deselect allEnter- Install selected packages (or the highlighted one)Up/Down/Ctrl+K/J- Navigate ·PgUp/PgDnHome/End- JumpCtrl+W/Ctrl+Backspace- Delete word ·Ctrl+U- Clear queryEsc- Quit
# View all curated developer tools
zap devtools
# Interactive mode shows suggestions automatically
zap
# (Popular tools like tmux, vim, git, curl, etc. appear when search is empty)The autocomplete feature includes popular developer tools organized by category:
- Editors: vim, neovim, emacs, nano, code, sublime-text
- Terminals: tmux, screen, zsh, fish, alacritty, kitty
- Version Control: git, git-lfs, mercurial, subversion
- Build Tools: make, cmake, gcc, clang, rust, go, nodejs, python3
- Utilities: htop, tree, jq, fzf, ripgrep, fd, bat, exa, starship, direnv
- Databases: postgresql, mysql, sqlite, redis, mongodb
- Containers: docker, podman, docker-compose, kubectl
- Networking: curl, wget, httpie, netcat, nmap, tcpdump
# Search for packages
zap search firefox
# Search with detailed info
zap search -i firefox
# Search with interactive selection
zap search -I firefox
# Search using a specific backend
zap -b flatpak search firefox# Get detailed package info
zap info neovim
# Info from specific backend
zap -b pip info numpy# Check and update packages
zap update
# Update packages from specific backend
zap -b cargo update# Show detected system and package manager
zap system# Show all available package managers on your system
zap managers# Show everything installed through the current backend
zap list
# Force a specific backend
zap -b pip list
zap -b npm list# Search npm interactively
zap npm
# Install npm packages directly
zap npm install typescript eslint
# Search crates.io / Docker Hub
zap cargo search clap
zap docker search nginx
# Fetch detailed info from pip/npm
zap pip info numpy
zap npm info reactUse zap search -I <term> with -b npm or -b pip for fuzzy selection inside those ecosystems.
| Command | Alias | Description |
|---|---|---|
search <query> |
s |
Search for packages |
install <packages> |
i |
Install packages |
info <package> |
- | Show package details |
interactive |
int |
Interactive mode |
update |
- | Update packages |
system |
- | Show system info |
managers |
pm |
List available package managers |
list |
ls |
Show packages installed via current backend |
self-update |
selfupdate |
Check for zap CLI updates |
devtools |
- | Show curated developer tools suggestions |
| Option | Short | Description |
|---|---|---|
--backend <backend> |
-b |
Select specific package manager backend |
--yes |
-y |
Auto-accept all prompts |
--help |
-h |
Show help |
--version |
-V |
Show version |
System: apt, aur, brew, dnf, pacman, pkg, zypper, winget, scoop, choco
Universal: flatpak, snap
Language: cargo, go, pip, npm
zap will automatically prompt to install missing Windows package managers (winget, Scoop, Chocolatey) or Python for the pip backend. Use -y/--yes to auto-approve those prompts in non-interactive environments.
zapautomatically checks GitHub Releases once per run (setZAP_DISABLE_UPDATE_CHECK=1to skip).- Run
zap self-updateat any time to compare your binary against the latest release. - To update manually, rerun the install script:
- Linux/macOS:
curl -fsSL https://raw.githubusercontent.com/broisnischal/zap/master/install.sh | bash -s latest - Windows: download the newest ZIP from the releases page and replace
zap.exe.
- Linux/macOS:
┌─────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ zap CLI │────▶│ OS Detection │────▶│ Backend Select │
└─────────────┘ └─────────────────┘ └─────────────────┘
│
┌────────────────────────────────────────────┼────────────────────────────────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐
│ System Backends │ │ Universal Backends│ │Language Backends │
├───────────────────┤ ├───────────────────┤ ├───────────────────┤
│ • apt (Debian) │ │ • flatpak │ │ • pip (Python) │
│ • aur (Arch) │ │ • snap │ │ • cargo (Rust) │
│ • dnf (Fedora) │ └───────────────────┘ │ • go (Go) │
│ • zypper (SUSE) │ └───────────────────┘
│ • pkg (FreeBSD) │
│ • brew (macOS) │
│ • pacman (Arch) │
└───────────────────┘
- Detection:
zapreads/etc/os-releaseand checks for package manager executables - Backend Selection: Based on the detected OS or
-bflag, it loads the appropriate backend - Unified Interface: All backends implement the same trait, providing consistent behavior
| Variable | Description | Default |
|---|---|---|
ZAP_INSTALL_DIR |
Installation directory for the install script | ~/.local/bin |
# On Arch Linux (auto-detects AUR)
zap neovim firefox
# On Ubuntu (auto-detects APT)
zap neovim firefox
# On macOS (auto-detects Homebrew)
zap neovim firefox
# On Fedora (auto-detects DNF)
zap neovim firefox# Install a Flatpak app
zap -b flatpak org.mozilla.firefox
# Install a Snap package
zap -b snap firefox
# Install Python packages
zap -b pip numpy pandas matplotlib
# Install Rust crates
zap -b cargo ripgrep bat fd-find
# Install Go tools
zap -b go github.com/junegunn/fzf# Search in AUR
zap -b aur search visual-studio-code
# Search in Flatpak
zap -b flatpak search vscode
# Search in Cargo (crates.io)
zap -b cargo search json# If installed via install script
rm ~/.local/bin/zap
# If installed via cargo
cargo uninstall zap
# If installed manually
sudo rm /usr/local/bin/zap- Rust 1.70+
- OpenSSL development libraries
# Debug build
cargo build
# Release build
cargo build --release
# Run tests
cargo test
# Run with logging
RUST_LOG=debug cargo runsrc/
├── main.rs # CLI entry point
├── backend/
│ ├── mod.rs # PackageManager trait
│ ├── detect.rs # OS detection
│ ├── bootstrap.rs # Package-manager/runtime bootstrap helpers
│ ├── apt.rs # Debian/Ubuntu backend
│ ├── aur.rs # Arch Linux AUR backend
│ ├── brew.rs # macOS Homebrew backend
│ ├── choco.rs # Windows Chocolatey backend
│ ├── cargo.rs # Rust Cargo backend
│ ├── dnf.rs # Fedora/RHEL backend
│ ├── flatpak.rs # Flatpak backend
│ ├── go.rs # Go install backend
│ ├── pacman.rs # Arch Linux pacman backend
│ ├── pip.rs # Python pip backend
│ ├── pkg.rs # FreeBSD pkg backend
│ ├── scoop.rs # Windows Scoop backend
│ ├── snap.rs # Snap backend
│ ├── winget.rs # Windows winget backend
│ └── zypper.rs # openSUSE zypper backend
└── ui/
└── mod.rs # TUI components
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
To add support for a new package manager:
- Create a new file in
src/backend/(e.g.,newpm.rs) - Implement the
PackageManagertrait - Add the module to
src/backend/mod.rs - Add the backend choice to
main.rs - Update OS detection in
detect.rsif needed
MIT License - see LICENSE for details.