aol/spam: A Software PAckage Manager utility - Codeberg.org
This website requires JavaScript.
aol/spam
Watch
Star
Fork
Code
Issues
Pull requests
Activity
A Software PAckage Manager utility
4 commits
1 branch
0 tags
61 KiB
Python
100%
main
Find a file
HTTPS
Download ZIP<br>Download TAR.GZ<br>Download BUNDLE
Open with VS Code
Open with VSCodium
Open with Intellij IDEA
Repository files (latest commit first)
Filename<br>Latest commit message<br>Latest commit date
Army of Light
4af3f184a1
bump vers
2026-07-21 20:33:42 -07:00
.gitignore
A fresh start.
2026-06-14 20:14:04 -07:00
LICENSE
A fresh start.
2026-06-14 20:14:04 -07:00
pyproject.toml
bump vers
2026-07-21 20:33:42 -07:00
README.md
docs
2026-07-21 20:25:22 -07:00
spam
enh: update default config
2026-06-16 17:06:10 -07:00
README.md
SPAM - A Software PAckage Manager
Ok let's be honest,<br>it's not really a package manager,<br>but merely a wrapper that presents a uniform command-line interface to them.<br>Across Linux distros,<br>flatpaks,<br>firmware updates,<br>and other Unixy things.
Usage & Features
👉 Easy to use every day,<br>There's less to type due to built-in aliases.<br>For example, to operate on the foo package:
⏵ spam -h # note usage and cmd list
⏵ spam up # short for `spam update; spam upgrade`<br>⏵ spam in foo # or install<br>⏵ spam rm foo # or uninstall<br>⏵ spam clean # clean up downloads, autoremove
# Moar!<br>⏵ spam add foo://bar # add repo<br>⏵ spam info foo # or show<br>⏵ spam lsf foo # or listfiles of pkg<br>⏵ spam pr /bin/foo # or provides, what or who-owns file<br>⏵ spam pu foo # or purge<br>⏵ spam se foo # or search
⏵ spam up --refresh # passes moar args to the first command<br>👉 Spam knows when to invoke sudo,<br>so you rarely need to worry about it.<br>Less to type for commands you may be running often across distros.
👉 It also can smooth over annoyances.
For example, by default it often passes --cacheonly to dnf subcommands so you<br>don't have to wait to download the index before searching for a package.<br>(The odds of a brand-new package being indexed in the last day or so is<br>exceedingly small.)<br>For apt it makes the update && dist-upgrade dance as simple as "up".
👉 It can run flatpak and/or firmware update commands as well.<br>Whatever you'd like as part of repetitive management.<br>Don't forget language library cleanup:<br>pip cache purge, cargo cache -a, go cache clean, etc.
👉 It prints each command it runs,<br>so you can learn how to do it on a package manager you may not be as familiar<br>with.<br>Also, if it wasn't able to do exactly what you want,<br>it is easier to tweak the next command.
👉 Finally,<br>if spam doesn't recognize a given sub-command,<br>it will just pass it along unmodified.<br>Muscle memory is not derailed in that case.
Support
Currently supports:
apt - Linux/Debian/Ubuntu/Mint
dnf - Linux/Fedora
opkg - Linux/OpenWRT (though may be phased out)
port - MacOS/MacPorts
With hopefully more to come as time allows.<br>Probably works on the Linux Subsystem for Windows (LSW).<br>¯\_(ツ)_/¯
Install
This is the Python version.<br>The name "spam" was taken on PyPi,<br>so the package is called spam-util there instead.
pip install --user spam-util
There are no dependencies so faffing about with virtual-envs is unnecessary.<br>It can then be run (as at the top of the page),<br>though you may need to put ~/.local/bin into your path.
Perhaps you'd prefer a small binary?<br>I've also<br>ported this to Rust<br>for fun.
Customization
This is done from a config.ini file in your $XDG_CONFIG_HOME folder.<br>A default is placed there on first run,<br>if it does not exist already:
⏵ edit ~/.config/spam/config.ini
May be useful to check it into a "dotfiles" repo.
Sections
Note: the sections and keys that are used specifically by spam are given a spam_<br>prefix.<br>All others will be used to configure local commands.<br>"Package manager" is abbreviated as PM below.
The important sections are these:
[spam_needs_sudo]<br># where sub-commands that require sudo are listed
[spam_aliases]<br># lists shortcuts, such as in for install, rm for remove
# sections, named to match the platform_ids from the<br># /etc/os-release file, ID=… value are described below:
[fedora]<br># The value of the spam_exec key sets the PM for the platform:<br>spam_exec = dnf
# sub-commands of the PM are listed below the section.<br># If there are multiple commands to run; use semicolons:
clean = clean packages; autoremove
[debian]<br># A "!" at the front of the command signifies it as stand-alone,<br># meaning it is *not* a sub-command of the PM.<br># Instead, spam will run the command as is:<br>add = !add-apt-repository
[ubuntu]<br># A spam_extends allows a section to inherit from another:<br>spam_extends = debian
# Yet overrides may be placed into the child section as well:<br>foo = bar; baz
Hope you enjoy.