LinuxCommandLibrary

aurvote

Vote on Arch User Repository (AUR) packages

TLDR

Interactively create the file ~/.config/aurvote containing your AUR username and password

$ aurvote --configure
copy

Vote for one or more AUR packages
$ aurvote [package1 package2 ...]
copy

Unvote one or more AUR packages
$ aurvote [[-u|--unvote]] [package1 package2 ...]
copy

Check if one or more AUR packages have already been voted
$ aurvote [[-c|--check]] [package1 package2 ...]
copy

Display help
$ aurvote [[-h|--help]]
copy

SYNOPSIS

aurvote [-h] [-u] package ...

PARAMETERS

-h, --help
    Display help message and exit

-u, --unvote
    Unvote instead of voting on packages

package
    One or more AUR package names to vote/unvote (required unless -h)

DESCRIPTION

aurvote is a lightweight command-line utility for Arch Linux users to vote or unvote packages in the Arch User Repository (AUR) without opening a web browser. Voting on AUR packages boosts their popularity score, influencing search rankings and recommendations on the AUR website.

It interacts with the AUR's RPC interface via curl, requiring a valid session cookie from logging into aur.archlinux.org. Users typically save their session cookie (named 'PHPSESSID') to a file like ~/.config/aurvote/cookie after browser login.

Usage is simple: specify package names to vote, or use -u to unvote. It supports multiple packages at once and provides feedback on success or errors like invalid cookies or non-existent packages. Ideal for AUR enthusiasts scripting package management or maintaining votes across many packages.

aurvote is part of the AUR ecosystem, complementing helpers like yay or paru, but focuses solely on voting. It's written as a bash script, making it easy to inspect and modify.

CAVEATS

Requires a valid AUR session PHPSESSID cookie file at $XDG_CONFIG_HOME/aurvote/cookie (default: ~/.config/aurvote/cookie). Create by logging into aur.archlinux.org in browser, copying cookie via dev tools. Fails silently on invalid cookies or non-AUR packages. Rate-limited by AUR servers.

COOKIE SETUP

1. Login to aur.archlinux.org.
2. F12 > Application > Cookies > Copy PHPSESSID value.
3. mkdir -p ~/.config/aurvote && echo 'PHPSESSID=your_value_here' > ~/.config/aurvote/cookie.

EXIT CODES

0: Success
1: Error (invalid args/cookie/package)
2: curl/HTTP failure

HISTORY

Developed by Christian Heusel (gromit) around 2020 as part of aurutils suite; available as 'aurvote' package in AUR. Evolved from user scripts for CLI AUR interaction, addressing need for browserless voting amid growing AUR popularity (>70k packages).

SEE ALSO

curl(1), paru(1), yay(1)

Copied to clipboard