Skip to content

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 Package Manager

A unified, modern CLI tool that brings multiple Linux package managers (DNF, APT, Pacman) and universal packaging formats (Flatpak, Snap) under a single, easy-to-use interface powered by Typer.


✨ Features

  • 🔍 Auto-Detection: Automatically detects the package manager available on your system.
  • 🐧 Multi-Distro Support:
    • Fedora / RHEL: DNF
    • Debian / Ubuntu: APT
    • Arch Linux: Pacman
  • 📦 Universal Formats:
    • Flatpak: Install, remove, and update Flathub applications.
    • Snap: Install, remove, and refresh snaps.
  • Non-Interactive & Scriptable: Supports --yes flags for automated scripts and CI pipelines.

📋 Requirements

  • Python: 3.10+
  • Privilege Escalation: sudo (or custom via --become-method)
  • Python Dependencies:
    • typer
    • python-dotenv

🚀 Installation & Setup

  1. Clone the repository:

    git clone https://github.com/flaouve/package-manager.git
    cd package-manager
  2. Create a virtual environment & install requirements:

    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt

💻 Usage

1. Install a Package

# System package manager (DNF / APT / Pacman)
python3 main.py install <package-name> --yes

# Using Flatpak
python3 main.py install <app-id> --flatpak --yes

# Using Snap
python3 main.py install <snap-name> --snap

2. Remove a Package

# System package manager
python3 main.py remove <package-name> --yes

# Using Flatpak
python3 main.py remove <app-id> --flatpak --yes

# Using Snap
python3 main.py remove <snap-name> --snap

3. Update / Upgrade System

# Update system packages
python3 main.py update --yes

# DNF security update only
python3 main.py update --security --yes

# Update Flatpaks
python3 main.py update --flatpak --yes

# Refresh Snaps
python3 main.py update --snap

🧪 Testing with Containers (Podman / Docker)

You can run automated tests across different Linux distributions using the multi-stage targets in Dockerfile:

# Test on Fedora
podman build --target Test_F .

# Test on Arch Linux
podman build --target Test_A .

# Test on Ubuntu
podman build --target Test_U .

# Test Flatpak support
podman build --target Test_FLATPAK .

# Test Snap environment
podman build --target Test_SNAP .

You can also pass custom base images:

podman build --target Test_F --build-arg BASE_IMAGE_FEDORA=fedora:40 .

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages