Skip to content
/ yaylog Public

A CLI util, written in Go / Golang, for Arch and Arch-based Linux distros to sort/filter installed packages.

License

Notifications You must be signed in to change notification settings

Zweih/yaylog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yaylog

yaylog is a CLI util, written in Go / Golang, for arch and arch-based linux distros to sort/filter installed packages.

despite the name, it's not limited to yay and works with any package manager that uses ALPM; so it can be used with pacman, yay, paru, aura, pamac, and even yaourt if you're somehow still using it.

yaylog supports optional filters/sorting for install date, package name, install reason (explicit/dependency), and size on disk.

Packaging status

GitHub Downloads (all assets, all releases)

this package is compatible with the following distributions:

  • arch linux
  • manjaro
  • garuda linux
  • endeavourOS
  • the 50 other arch-based distros, as long as it has pacman installed

features

  • list installed packages with timestamps
  • display package versions
  • filter results by explicitly installed packages
  • filter results by packages installed as dependencies
  • sort results by installation date, alphabetically, or by size on disk
  • filter results by a specific installation date or date range
  • filter results by package size or size range
  • filter results by package name (substring match)

why is it called yaylog if it works with other AUR helpers?

because yay is my preferred AUR helper and the name has a good flow.

is it good?

yes.

roadmap

  • rewrite in golang
  • additional filters
  • list possibly or confirmed stale/abandoned packages
  • sort by size on disk
  • dependency graph
  • concurrent filtering
  • filter by size on disk
  • asynchronous progress bar
  • channel-based aggregation
  • concurrent sorting
  • search by text input
  • list package versions
  • filter by date range
  • concurrent file reading (2x speed boost)
  • remove expac as a dependency (3x speed boost)
  • optional full timestamp
  • add CI to release binaries
  • remove go as a dependency
  • filter by range of size on disk
  • list dependencies of each package
  • list packages that depend on each package

installation

from AUR (recommended)

install the binary using an AUR helper like yay:

yay -S yaylog-bin

if you prefer to install from source using the AUR, use the yaylog package instead.

for the latest (unstable) version from git w/ the AUR, use yaylog-git*.

*note: this is not recommended for most users

building from source + manual installation

note: this packages is specific to arch-based linux distributions

  1. clone the repo:
    git clone https://github.com/zweih/yaylog.git
    cd yaylog
  2. build the binary:
    go build -o yaylog ./cmd/yaylog
  3. copy the binary to your system's $PATH:
    sudo install -m755 yaylog /usr/bin/yaylog
  4. copy the manpage:
    sudo install -m644 yaylog.1 /usr/share/man/man1/yaylog.1

usage

yaylog [options]

options

  • -n <number> | --number <number>: number of recent packages to display (default: 20)
  • -a | all: show all installed packages (ignores -n)
  • -e | --explicit: show only explicitly installed packages
  • -d | --dependencies: show only packages installed as dependencies
  • -v: show column for current version of packages
  • --date <filter>: filter packages by installation date. Supports:
    • YYYY-MM-DD → show packages installed on the specified date
    • YYYY-MM-DD: → show packages installed on or after the date
    • :YYYY-MM-DD → show packages installed up to the date
    • YYYY-MM-DD:YYYY-MM-DD → show packages installed within a date range
  • --size <filter>: filter packages by size on disk. Supports:
    • 10MB → show packages exactly 10MB in size
    • 5GB: → show packages 5GB and larger
    • :20KB → show packages up to 20KB
    • 1.5MB:2GB → show packages between 1.5MB and 2GB
    • Valid units: B (bytes), KB, MB, GB
  • --name <search-term>: filter packages by name (substring match)
    • Example: gtk matches gtk3, libgtk, etc.
  • --sort <mode>: sort results by:
    • date (default) → sort by installation date
    • alphabetical → sort alphabetically by package name
    • size:asc / size:desc → sort by package size (ascending or descending)
  • --full-timestamp: display the full timestamp (date and time) of package installations instead of just the date
  • --no-progress: force no progress bar outside of non-interactive environments
  • -h | --help: print help info

examples

  1. show the last 10 installed packages:
    yaylog -n 10
  2. show all explicitly installed packages:
    yaylog -ae
  3. show only dependencies installed on a specific date:
    yaylog -d --date 2024-12-25
  4. show all packages sorted alphabetically:
    yaylog -a --sort alphabetical
  5. show the 15 most recent explicitly installed packages:
    yaylog -en 15
    note: the -e flag must be used before the -n flag as the n flag consumes the next argument.
  6. show packages installed between July 1, 2023, and December 31, 2023:
    yaylog --date 2023-07-01:2023-12-31
  7. show the 20 most recently installed packages larger than 20MB:
    yaylog --size 20MB:
  8. show all dependencies smaller than 500KB:
    yaylog -ad --size :500KB
  9. show packages between 100MB and 1GB installed up to June 30, 2024:
    yaylog --size 100MB:1GB --date :2024-06-30
  10. show all packages sorted by size in descending order, installed after January 1, 2024:
yaylog -a --sort size:desc --date 2024-01-01:
  1. search for installed packages containing "python":
yaylog --name python
  1. search for explicitly installed packages containing "lib" that are between 10MB and 1GB in size:
yaylog -e --name lib --size 10MB:1GB
  1. search for packages containing "linux" that were installed between January 1 and June 30, 2024:
yaylog --name linux --date 2024-01-01:2024-06-30
  1. search for packages containing "gtk" that were installed after January 1, 2023, and are at least 5MB in size:
yaylog --name gtk --date 2023-01-01: --size 5MB:

license

this project is licensed under the MIT license. see license for details.