Repository navigation
pak-explorer
Pre-release
Pre-release
·
14 commits
to master
since this release
pak v0.1.0-alpha
First public pre-release. The core of what makes pak useful is here: a fully interactive, three-pane view of your Arch package database: package list, info panel, and dependency tree, all parsed directly from /var/lib/pacman/local/ with no pacman calls and no network.
The statically compiled binary has no runtime dependencies. Download, chmod +x, run.
What's in this release
Parse pipeline
Five-pass startup pipeline that reads the pacman local database:
- Directory scan to pre-allocate the package array to the exact count
descfile parse — name, version, description, size, install reason, deps, optional deps, provides- Sort packages by name
- Index construction — name index and provides index (with multi-provider support, e.g. several packages providing the same soname)
- Dependency resolution —
depsandopt_depsresolved to stable integer IDs;required_byandopt_req_byreverse graphs constructed
All data lives in a single arena. No heap allocation after startup.
Package list pane
- Full scrollable package list with Page Up / Page Down (jumps of 10)
- Sort by name (
n) or size (s, largest first) - Substring filter (press
fto enter,Escto clear) - Two special filter tokens:
[!]shows only orphans,[S]shows only still-required deps - Package badges:
[E]explicit ·[S]required dep ·[!]orphan (amber)
Info panel
Always tracks the package under the list cursor. Shows:
- Name and version
- Description
- Installed size
- Full dep list and optional dep list
- Reverse dep list (
Required By) and optional reverse dep list (Opt Required By)
Dependency tree pane
- Collapsible tree rooted at the selected package, rebuilt incrementally on expand/collapse
- Expand / collapse with
SpaceorEnter - Optional dependencies shown dimmed, distinct from required deps
[shared]badge on packages that more than one other package depends on(↺)marks cyclic nodes — detected by ancestor chain walk, not expanded further- Tree cursor is independently navigable (
↑/↓) from the package list
TUI
- Built on vaxis
- Three-pane layout: package list (25%) | info (35%) | dep tree (40%), proportions computed from terminal width
- Switch focus between package list and dep tree with
←/→orj/k - Live terminal resize via
SIGWINCH— no corruption or crashes on resize - Header shows total package count, and total installed size
Keybindings
| Key | Action |
|---|---|
| ↑ / ↓ | Move cursor |
| Page Up / Page Down | Move cursor by 10 |
| ← / → or j / k | Switch pane |
| f | Enter filter mode |
| Esc | Exit filter / clear |
| Enter | Confirm filter |
| Space / Enter | Expand or collapse dep tree node |
| n | Sort by name |
| s | Sort by size |
| q | Quit |
What's not here yet
- Remove simulation (exclusive transitive size, packages that would be reclaimed)
- Per-package file list and filter
- Global file owner search
- Clipboard yank
[?]help overlay
Installation
Download the binary from the assets below. Arch Linux only.
chmod +x pak
./pak