No description
- Go 100%
| internal | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
arch-linux-package-search
A Go TUI for searching official Arch Linux packages and the AUR, powered by bleve full-text search. Type a query and get instant, ranked results across package names, descriptions, and versions.
Features
- Indexes directly from local pacman sync databases (
/var/lib/pacman/sync/*.db) -- no API pagination, no rate limits, instant and complete - Optionally fetches the full AUR metadata archive in one request
(
packages-meta-ext-v1.json.gz) - Full-text search via bleve with field boosting (name 5x, description 1x, version 0.5x)
- Debounced search input for smooth interactive use
- Detail view with package metadata and direct Arch/AUR links
- Persistent on-disk index (cached under
$XDG_CACHE_HOME)
Requirements
- Go 1.21+
- Arch Linux (or any distro with pacman sync databases at
/var/lib/pacman/sync/) - Network access to
aur.archlinux.orgonly if you want AUR packages
Build
go build -o arch-linux-package-search .
Usage
On first run, the tool reads your local pacman sync databases and (optionally) downloads the AUR metadata archive to build a bleve index. The official repo data comes straight from disk so it's near-instant. The AUR download is ~15 MB compressed and takes a few seconds.
# Launch the interactive TUI (indexes on first run)
./arch-linux-package-search
# Force a re-index from current sync DBs + AUR
./arch-linux-package-search --refresh
# Skip AUR (fully offline, only official repos)
./arch-linux-package-search --no-aur
# Custom pacman sync DB path (e.g. for a chroot or another machine's DBs)
./arch-linux-package-search --sync-dir /mnt/arch/var/lib/pacman/sync
# Pre-populate the search
./arch-linux-package-search linux