Metadata-Version: 2.4
Name: pacman-apt-wrapper
Version: 0.1.1
Summary: Pacman-style wrapper for apt-get/apt-cache/dpkg-query
Author: Pacman Apt Wrapper Contributors
License-Expression: MIT
Project-URL: Homepage, https://github.com/networkluki/pacman-apt-wrapper
Project-URL: Source, https://github.com/networkluki/pacman-apt-wrapper
Project-URL: Issues, https://github.com/networkluki/pacman-apt-wrapper/issues
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Software Distribution
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# pacman-apt (A pacman-like CLI compatibility layer for linux systems)

## Abstract
`pacman-apt` provides a small subset of Arch Linux `pacman`-style commands on
linux system by translating them into native `apt-get` / `apt-cache` / `dpkg-query`
invocations. The goal is consistent operator muscle-memory across distributions,
not to replace the underlying package manager.

## Motivation
Operators and developers frequently work across multiple Linux distributions.
Command surface area differences (e.g. `pacman -Syu` vs `apt update && apt upgrade`)
increase cognitive load and can lead to mistakes during routine maintenance.

This project reduces that friction by offering a minimal, explicit translation layer.

## Scope
### Goals
- Provide a pacman-like UX for common workflows on linux system:
  - `-Syu`, `-S`, `-R`, `-Rns`, `-Ss`, `-Qi`, `-Q`
- Prefer stable, script-friendly Debian tooling (`apt-get`, `apt-cache`, `dpkg-query`)
- Transparent execution: print commands before running them

### Non-goals
- Not a package manager: no repository handling, no dependency resolution
- Not a full `pacman` implementation
- Not intended for Arch Linux (where `pacman` already exists)

## Design Overview
`pacman-apt` parses a small flag subset and maps it to linux tooling:

| pacman-style | linux backend |
|---|---|
| `pacman -Syu` | `apt-get update && apt-get dist-upgrade -y` |
| `pacman -S <pkg...>` | `apt-get install -y <pkg...>` |
| `pacman -R <pkg...>` | `apt-get remove -y <pkg...>` |
| `pacman -Rns <pkg...>` | `apt-get purge -y <pkg...> && apt-get autoremove --purge -y` |
| `pacman -Ss <query>` | `apt-cache search <query>` |
| `pacman -Qi <pkg>` | `apt-cache show <pkg>` (metadata; see Limitations) |
| `pacman -Q` | `dpkg-query -W -f='${binary:Package}\t${Version}\n'` |

For design rationale, see `docs/design.md`.

## Security Model
- No `shell=True`; all subprocess calls use explicit argument arrays
- Conservative privilege handling (uses `sudo` when not root)
- Commands are echoed before execution for auditability

See `docs/security.md` for the threat model and assumptions.

## Compatibility
- Debian: stable
- Ubuntu: LTS

(Exact versions may vary; see `docs/compatibility.md`.)

## Installation
### Install with pip
From a local checkout:
```bash
python -m pip install .
```

For development, use an editable install:
```bash
python -m pip install -e .
```

Both pip installs create these commands in the active Python environment:
- `pacman`
- `pacman-apt`

If your Python environment's script directory is not on `PATH`, run the module
entrypoint directly instead:
```bash
python -m pacman_apt.cli --help
```

### Manual (single-file)
```bash
sudo install -m 0755 pacman /usr/local/bin/pacman
```
