Low-Level Command Reference

This page provides a brief overview of the lower-level utility commands in aurutils.

aur-query

Sends requests to the aurweb RPC interface.

  • Synopsis: aur query -t type [-b by] <pkgname...>
  • Description: A thin wrapper around curl for querying the AUR's JSON RPC API. It is used internally by aur-depends and aur-search.
  • Key Options:
    • -t, --type=: The type of request (info, search, suggest). This is mandatory.
    • -b, --by=: For search requests, the field to search by (name, name-desc, maintainer, etc.).

aur-pkglist

Retrieves and caches the full list of AUR package names.

  • Synopsis: aur pkglist [options] [pattern]
  • Description: Downloads and caches archives of AUR metadata, such as the list of all package names or package bases.
  • Key Options:
    • -b, --pkgbase: Retrieve pkgbase.gz instead of packages.gz.
    • -i, --info: Retrieve the full metadata archive (packages-meta-ext-v1.json).
    • -q, --quiet: Update the list and print the path to the cached file.
    • -t, --ttl: The time-to-live in seconds for the cache.

aur-vercmp

Compares local package versions against the AUR.

  • Synopsis: aur vercmp [options]
  • Description: Reads a list of pkgname pkgver from standard input and compares them against versions in the AUR or a specified file.
  • Key Options:
    • -p FILE, --path=FILE: Compare against versions in FILE instead of the AUR.
    • -a, --all: Show packages with an older or equal version in the AUR.
    • -c, --current: Show packages with an equal or newer version.
    • -q, --quiet: Print only package names.

aur-srcver

Updates and prints the version of VCS packages.

  • Synopsis: aur srcver [options] <pkgbase...>
  • Description: For packages with a pkgver() function (typically -git packages), this command runs makepkg -od to update the version string to the latest commit and prints the result.
  • Key Options:**
    • -j NUM, --jobs=NUM: Number of parallel makepkg processes to run.
    • --no-prepare: Do not run the prepare() function in the PKGBUILD.

aur-graph

Prints a package/dependency directed graph from .SRCINFO files.

  • Synopsis: aur graph [.SRCINFO...]
  • Description: Parses .SRCINFO files to create a dependency graph, validating provides and versioned dependencies. The output is suitable for tsort.
  • Key Options: Options are passed with -v KEY=VALUE.
    • CHECKDEPENDS=[0|1]: Enable or disable checking of checkdepends.
    • REVERSE=[0|1]: Reverse the output format.

aur-repo-filter

Filters a list of packages against official repositories.

  • Synopsis: aur repo-filter [options]
  • Description: Reads a list of package names from standard input and prints only those that are NOT found in the specified official repositories. This is used to determine which dependencies are from the AUR.
  • Key Options:
    • -a, --all, --sync: Query all configured sync repositories.
    • -d NAME, --database=NAME: Restrict the check to a specific repository.

aur-format

Formats JSON output into text strings.

  • Synopsis: aur format -f <format_string> [file...]
  • Description: A powerful utility to parse JSON output from commands like aur-query or aur-repo -J and format it using printf-style format strings.
  • Key Options:
    • -f FORMAT, --format=FORMAT: The format string (e.g., '%n\t%v\n').
    • --gron: Format output similar to the gron tool.