4.3 KiB
AurManager
A small set of shell scripts to manage AUR packages on Arch Linux without yay, paru, or any other AUR helper.
This project follows the classic AUR workflow: clone the package repository, review the PKGBUILD, build with makepkg, and install with pacman -U.
Included scripts
aurinstall— clone or update an AUR package repository, optionally reviewPKGBUILD, build the package, and install it withpacman -U.aurupdate— iterate through local AUR package repositories, pull updates, rebuild selected packages, and reinstall them locally.aurremove— remove installed AUR packages withpacman -Rnsand optionally delete the local repository directory._aurtools— Zsh completion file for the scripts, including optional online package-name completion foraurinstallvia the AUR RPC interface.
Why use this
This setup is intended for users who want full visibility into what gets built and installed from the AUR. Instead of relying on a full AUR helper, it keeps each package as a normal Git repository under ~/Aur, making updates and audits easier to understand and review.
Requirements
Install the usual Arch build tools first:
sudo pacman -S --needed base-devel git
Some optional features require additional tools:
sudo pacman -S curl jq zsh
curlandjqare used by the optional online completion foraurinstallthrough the AUR RPC API.zshis needed only for the provided completion script.- An editor such as
nvimis useful ifaurinstallis run with review options like-e,-E, or-d.
Installation
Copy the scripts somewhere in your PATH, for example ~/.local/bin:
mkdir ~/Aur
install -Dm755 aurinstall ~/.local/bin/aurinstall
install -Dm755 aurupdate ~/.local/bin/aurupdate
install -Dm755 aurremove ~/.local/bin/aurremove
Install the Zsh completion file:
mkdir -p ~/.zsh/completions
install -Dm644 completions/_aurtools ~/.zsh/completions/_aurtools
Then ensure the completion directory is in fpath and initialize completion in ~/.zshrc:
fpath=("$HOME/.zsh/completions" $fpath)
autoload -Uz compinit
compinit
Repository layout
The scripts assume that AUR repositories are stored under ~/Aur by default:
~/Aur/
├── package-one/
├── package-two/
└── package-three/
Each package is kept as its own Git repository cloned from https://aur.archlinux.org/<pkgname>.git, which matches the documented AUR workflow.
Usage
Install a package
aurinstall proton-pass-bin
This clones the package if needed, builds it with makepkg, and installs the resulting package file with pacman -U.
Prompt before editing build files
aurinstall -e swayfx
Always open PKGBUILD before building
aurinstall -E swayfx
Reviewing PKGBUILD before building is an important AUR safety habit because makepkg executes build instructions defined there.
Download and audit only
aurinstall -d swayfx
This mode updates or clones the repository and lets the user inspect package files without building or installing anything.
Update local AUR repositories
aurupdate
This walks through the repositories stored in ~/Aur, pulls upstream changes, and rebuilds selected packages.
Remove a package
aurremove calcure
This removes the installed package with pacman -Rns, which removes the package, unneeded dependencies, and package-managed config files.
Zsh completion
The included completion script supports:
- local completion from existing repositories in
~/Aurforaurinstall - optional remote name completion for
aurinstallthrough the AUR RPC interface - completion of installed foreign packages for
aurremoveviapacman -Qm
If completion behaves strangely after changes, rebuild the completion cache:
rm -f ~/.cache/zsh/zcompdump*
autoload -Uz compinit
compinit
Security note
AUR packages are user-contributed build scripts, not official binary packages. The safest workflow is to inspect PKGBUILD, sources, checksums, and build steps before installation.
License
A permissive license such as MIT or ISC fits this kind of shell-script project well. GitHub recommends adding an explicit license if the repository is meant to be reused by others.