Skip to content

stefan-hacks/fza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 

Repository files navigation

fza - Fuzzy APT Package Manager

Version License Platform

A beautiful, interactive terminal package manager powered by nala, fzf, and bat

Features β€’ Installation β€’ Usage β€’ Keybinds β€’ Screenshots


🌟 Features

  • πŸ” Fuzzy Search - Lightning-fast package search with fuzzy finding
  • 🎨 Syntax Highlighting - Beautiful syntax highlighting for package info with bat
  • πŸ–ΌοΈ Interactive Previews - Real-time package information in preview panes
  • ⚑ Fast Operations - Powered by nala for faster package management
  • 🎯 Multi-Select - Select multiple packages at once with Tab
  • πŸ“Š Statistics - View detailed package statistics
  • πŸ“œ History Tracking - All operations logged for reference
  • 🌐 Mirror Management - Benchmark and configure mirrors with nala fetch
  • ⌨️ Rich Keybinds - Extensive keyboard shortcuts for efficient navigation
  • 🎭 Hidden Previews - Preview windows hidden by default, toggle with Ctrl+/

πŸ“‹ Requirements

  • Debian-based distribution (Debian, Ubuntu, Linux Mint, Pop!_OS, etc.)
  • fzf - Fuzzy finder
  • bat or batcat - Syntax highlighter
  • nala (optional, falls back to apt) - Fast package manager
  • sudo privileges for package operations

πŸš€ Installation

Quick Install (Recommended)

# Download the script
curl -o fza https://raw.githubusercontent.com/stefan-hacks/fza/main/fza.sh

# Make it executable
chmod +x fza

# Move to system path
sudo mv fza /usr/local/bin/

# Install dependencies
sudo apt update
sudo apt install -y nala fzf bat

# Optional: Install nala for better performance
echo "deb https://deb.volian.org/volian/ scar main" | sudo tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list
wget -qO - https://deb.volian.org/volian/scar.key | sudo tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null
sudo apt update && sudo apt install -y nala

Manual Installation

  1. Clone the repository:
git clone https://github.com/stefan-hacks/fza.git
cd fza
  1. Install dependencies:
sudo apt update
sudo apt install -y nala fzf bat
  1. Install nala (optional but recommended):
echo "deb https://deb.volian.org/volian/ scar main" | sudo tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list
wget -qO - https://deb.volian.org/volian/scar.key | sudo tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null
sudo apt update && sudo apt install -y nala
  1. Make executable and install:
chmod +x fza.sh
sudo cp fza.sh /usr/local/bin/fza
  1. Verify installation:
fza --help

πŸ’» Usage

Interactive Mode (Recommended)

Simply run fza with sudo to open the interactive menu:

sudo fza

Navigate through the beautiful menu to:

  • Search and install packages
  • Remove packages
  • List installed packages
  • Update package lists
  • Upgrade all packages
  • View package information
  • And more!

Command Line Mode

fza also supports direct command-line operations:

# Search for packages (interactive)
fza search

# Search for specific package
fza search firefox

# Install packages (interactive)
sudo fza install

# Install specific packages
sudo fza install firefox vlc

# Remove packages (interactive)
sudo fza remove

# Remove specific packages
sudo fza remove firefox

# Update package lists
sudo fza update

# Upgrade all packages
sudo fza upgrade

# List installed packages
fza list

# Show package information
fza info firefox

# View operation history
fza history

# Show package statistics
fza stats

# Benchmark and configure mirrors (nala only)
sudo fza fetch

Command Aliases

Short forms are also supported:

sudo fza i          # install
sudo fza r          # remove
fza s               # search
sudo fza u          # update
sudo fza U          # upgrade
fza l               # list
fza h               # history
fza t               # stats

⌨️ Keybinds

Main Navigation

Key Action
↑/↓, j/k Navigate up/down
Ctrl+p/n Navigate up/down (alternative)
Ctrl+g Jump to top
Alt+g Jump to bottom
Page Up/Down Scroll page

Preview Window

Key Action
Ctrl+/ Toggle preview on/off
Alt+p Toggle preview on/off
Ctrl+u/d Scroll preview page up/down
Ctrl+y/e Scroll preview line up/down
Alt+↑/↓ Scroll preview line up/down
Shift+↑/↓ Scroll preview page up/down
Alt+w Toggle text wrapping
Alt+1/2/3 Resize preview right (40%/50%/60%)
Alt+4/5 Resize preview down (40%/50%)
Alt+0 Maximize preview (99%)

Selection

Key Action
Tab Select/deselect current item
Shift+Tab Select/deselect + move up
Ctrl+Space Select + move down
Alt+a Select all items
Alt+d Deselect all items
Alt+t Toggle all selections

Actions

Key Action
Enter Confirm selection
Esc Return to main menu
q Quit fza completely
Ctrl+c Quit fza completely
? Show full keybinds help
Alt+i View full package details with bat
Alt+f View package files
Ctrl+s Toggle sort

🎨 Screenshots

Main Menu

╔═══════════════════════════════════════════╗
β•‘   FZA - Fuzzy APT Package Manager         β•‘
β•‘   Powered by nala + fzf + bat             β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

πŸ”  Search & Install Packages
πŸ—‘οΈ  Remove Packages
πŸ“‹  List Installed Packages
πŸ”„  Update Package Lists
⬆️  Upgrade All Packages
ℹ️  Show Package Info
🧹  Autoremove Unused Packages
πŸ”§  Fix Broken Dependencies
πŸ“Š  Show Package Statistics
πŸš€  History & Rollback
🌐  Nala Fetch Mirrors
❓  Show Keybinds Help
❌  Exit

Package Search with Preview

Search & Install Packages
Keybinds: Ctrl+/=preview Alt+1/2/3=resize Tab=select Esc=menu q=quit ?=help

> firefox
  firefox              Mozilla Firefox web browser
  firefox-esr          Mozilla Firefox ESR web browser
  firefox-locale-en    Firefox English language pack

Preview (Ctrl+/ to toggle):
╔══════════════════════════════════════════╗
β•‘ Package: firefox                         β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Package: firefox
Version: 120.0+build1-0ubuntu1
Architecture: amd64
Description: Mozilla Firefox web browser
 Firefox is a powerful, extensible web browser...

πŸ”§ Configuration

fza stores its cache and history in ~/.cache/fza/:

  • package_descriptions.cache - Package list cache (refreshed every hour)
  • history - Operation history log

To clear the cache:

rm -rf ~/.cache/fza/

πŸ› Troubleshooting

"Missing dependencies" error

Make sure all dependencies are installed:

sudo apt install fzf bat

"This operation requires root privileges" error

Most package operations require sudo:

sudo fza

bat command not found

On some systems, bat is installed as batcat. fza automatically detects this.

Preview window not showing

Press Ctrl+/ or Alt+p to toggle the preview window (hidden by default).

Nala not available

fza automatically falls back to apt if nala is not installed. For better performance, install nala:

sudo apt install nala

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

About

Lightning-fast package search with fuzzy finding

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages