From 1958a47ddf64f3e7082c4a9aeb8e0107d7f9c245 Mon Sep 17 00:00:00 2001 From: Oz Date: Fri, 14 Aug 2026 01:37:10 +0000 Subject: [PATCH 1/2] Reconcile paru.json with the current paru v2.1.0 CLI command-signatures/json/paru.json was written mainly from paru's shipped completions/fish script (last touched 2025-10-06, commit 46e39bb), which has drifted from paru's actual CLI. Audited the whole file against `paru --help` and the v2.1.0 man page, both captured by building paru from the AUR in an archlinux container. Corrections: - `-N`/`--repo` short form: already correctly modeled as bare `--repo` in this file (the drift ticket's premise didn't apply here). - `-L`/`--repoctl` and `-C`/`--chrootctl`: contrary to the drift ticket, these still exist and work in v2.1.0 (`paru --help` omits them, but the man page documents them and `paru -L`/`paru -C -p` both run as real operations, verified by execution). Left in place, added `-C`'s missing `-p`/`--print` option. - Added missing operation options: `-P`'s `-o`/`--order` (buildorder), `-G`'s `-s`/`--ssh` (clone via SSH). - Added `--mode`, `--pkgbuilds`, `-x`/`--regex`, `--interactive` (the drift ticket's original find). - Added ~25 more options documented in the man page but missing from the spec entirely: --ignoredevel, --develsuffixes, --savechanges/ --nosavechanges, --newsonupgrade, --failfast/--nofailfast, --nocheck, --installdebug/--noinstalldebug, --makepkgconf, --mflags, --gitflags, --gpgflags, --sudo, --sudoflags, --sudoloop/ --nosudoloop, --pkgctl, --bat, --batflags, --fmflags, --chroot/ --nochroot, --chrootflags, --chrootpkgs, --localrepo/--nolocalrepo, --keeprepocache/--nokeeprepocache, --sign/--nosign, --signdb/ --nosigndb. - Removed `--builddir` and `--pager`: neither exists in paru's CLI (`--builddir` is yay's flag name for the same concept paru calls `--clonedir`, which was already present; `--pager` doesn't appear in --help or the man page, only the unrelated PARU_PAGER env var). - Gave `--rebuild`, `--redownload`, and `--removemake` their documented optional enum arguments (`[yes|no|all|tree]`, `[yes|no|all]`, `[yes|no|ask]`), which were previously modeled as bare flags. - Refined several descriptions to match the man page's own wording (--noprovides, --topdown/--bottomup, --nouseask, --gendb, --devel/ --nodevel). - Marked -a/--aur, --repo, --pkgbuilds, and --mode as isPersistent so they surface under -Q/-R/-S/-T, matching the man page's "EXTENDED PACMAN OPERATIONS" section (e.g. "-Ta" filters to AUR packages). Left unchanged: pacman.json, yay.json, generators/common.rs, and paru's own generator behavior (list_all_packages/paru -Pc still produces the same space-separated output on v2.1.0, verified by execution in the same container). Co-Authored-By: Warp Agent --- command-signatures/json/paru.json | 340 +++++++++++++++++++++++++++--- 1 file changed, 311 insertions(+), 29 deletions(-) diff --git a/command-signatures/json/paru.json b/command-signatures/json/paru.json index 0e79ebaf..17fdc247 100644 --- a/command-signatures/json/paru.json +++ b/command-signatures/json/paru.json @@ -1043,6 +1043,13 @@ "--stats" ], "description": "Display system package statistics" + }, + { + "name": [ + "-o", + "--order" + ], + "description": "Print buildorder for targets" } ] }, @@ -1063,6 +1070,13 @@ "--stats" ], "description": "Display system package statistics" + }, + { + "name": [ + "-o", + "--order" + ], + "description": "Print buildorder for targets" } ] }, @@ -1083,6 +1097,13 @@ "--comments" ], "description": "Print the AUR comments from the PKGBUILD's AUR page" + }, + { + "name": [ + "-s", + "--ssh" + ], + "description": "Clone the AUR package using SSH" } ], "isVariadic": true, @@ -1107,6 +1128,13 @@ "--comments" ], "description": "Print the AUR comments from the PKGBUILD's AUR page" + }, + { + "name": [ + "-s", + "--ssh" + ], + "description": "Clone the AUR package using SSH" } ], "isVariadic": true, @@ -1213,6 +1241,13 @@ "--sysupgrade" ], "description": "Upgrade the chroot" + }, + { + "name": [ + "-p", + "--print" + ], + "description": "Print path to currently configured chroot" } ] }, @@ -1233,6 +1268,13 @@ "--sysupgrade" ], "description": "Upgrade the chroot" + }, + { + "name": [ + "-p", + "--print" + ], + "description": "Print path to currently configured chroot" } ] }, @@ -1410,11 +1452,35 @@ "-a", "--aur" ], - "description": "Assume targets are from the AUR" + "description": "Assume all targets are from the AUR", + "isPersistent": true }, { "name": "--repo", - "description": "Assume targets are from the repositories" + "description": "Assume all targets are from the repositories", + "isPersistent": true + }, + { + "name": "--pkgbuilds", + "description": "Assume all targets are from the PKGBUILD repositories", + "isPersistent": true + }, + { + "name": "--mode", + "description": "Select what kinds of packages paru should act on", + "isPersistent": true, + "args": { + "name": "mode", + "suggestions": [ + "aur", + "repo", + "pkgbuilds" + ] + } + }, + { + "name": "--interactive", + "description": "Enable interactive package selection for -S, -R, -Ss and -Qs" }, { "name": [ @@ -1425,15 +1491,36 @@ }, { "name": "--gendb", - "description": "Generate development package DB used for updating -git/-svn/-hg packages" + "description": "Generate the development package database used to detect -git/-svn/-hg updates" }, { "name": "--devel", - "description": "Check -git/-svn/-hg development packages for updates during sysupgrade" + "description": "Check AUR development packages for updates during sysupgrade" }, { "name": "--nodevel", - "description": "Disable development version checking" + "description": "Do not check development packages for updates during sysupgrade" + }, + { + "name": "--ignoredevel", + "description": "Ignore devel upgrades for specified packages", + "args": { + "name": "package" + } + }, + { + "name": "--develsuffixes", + "description": "Suffixes used to decide if a package is a devel package", + "args": { + "name": "suffixes" + } + }, + { + "name": [ + "-x", + "--regex" + ], + "description": "Enable regex for AUR search" }, { "name": "--sortby", @@ -1499,27 +1586,27 @@ }, { "name": "--topdown", - "description": "Shows repository packages first and then aur" + "description": "Print search results from top to bottom, with repository packages first (default)" }, { "name": "--bottomup", - "description": "Shows aur packages first and then repository" + "description": "Print search results from bottom to top, with AUR packages first" }, { "name": "--provides", - "description": "Look for matching providers when searching for packages" + "description": "Look for matching providers when searching for AUR packages" }, { "name": "--noprovides", - "description": "Just look for packages by pkgname" + "description": "Do not look for matching providers when searching for AUR packages" }, { "name": "--pgpfetch", - "description": "Prompt to import PGP keys from PKGBUILDs" + "description": "Prompt to import unknown PGP keys from PKGBUILDs" }, { "name": "--nopgpfetch", - "description": "Do not prompt to import PGP keys" + "description": "Do not prompt to import unknown PGP keys" }, { "name": "--useask", @@ -1527,7 +1614,19 @@ }, { "name": "--nouseask", - "description": "Confirm conflicts manually during the install" + "description": "Manually resolve package conflicts during the install" + }, + { + "name": "--savechanges", + "description": "Commit changes to PKGBUILDs made during review" + }, + { + "name": "--nosavechanges", + "description": "Don't commit changes to PKGBUILDs made during review" + }, + { + "name": "--newsonupgrade", + "description": "Print new news during sysupgrade" }, { "name": "--combinedupgrade", @@ -1543,11 +1642,21 @@ }, { "name": "--nobatchinstall", - "description": "Build and install each AUR package one by one" + "description": "Always install AUR packages immediately after building them" }, { "name": "--rebuild", - "description": "Always build target packages even when a copy is available in cache" + "description": "Always build target packages even when a copy is available in cache", + "args": { + "name": "mode", + "suggestions": [ + "yes", + "no", + "all", + "tree" + ], + "isOptional": true + } }, { "name": "--norebuild", @@ -1555,11 +1664,20 @@ }, { "name": "--redownload", - "description": "Always download PKGBUILDs of targets even when a copy is available in cache" + "description": "Always download PKGBUILDs of targets even when a copy is available in cache", + "args": { + "name": "mode", + "suggestions": [ + "yes", + "no", + "all" + ], + "isOptional": true + } }, { "name": "--noredownload", - "description": "Do not redownload up-to-date PKGBUILDs" + "description": "Use a cached PKGBUILD instead of downloading a new one when it's up to date" }, { "name": "--cleanafter", @@ -1567,7 +1685,7 @@ }, { "name": "--nocleanafter", - "description": "Disable removing untracked files after installation" + "description": "Do not remove package sources after successful install" }, { "name": "--keepsrc", @@ -1579,11 +1697,40 @@ }, { "name": "--removemake", - "description": "Remove make deps after install" + "description": "Remove makedepends after installing packages", + "args": { + "name": "mode", + "suggestions": [ + "yes", + "no", + "ask" + ], + "isOptional": true + } }, { "name": "--noremovemake", - "description": "Do not remove make deps after install" + "description": "Don't remove makedepends after installing packages" + }, + { + "name": "--failfast", + "description": "Exit as soon as any AUR packages fail to build" + }, + { + "name": "--nofailfast", + "description": "Don't exit as soon as any AUR packages fail to build" + }, + { + "name": "--nocheck", + "description": "Don't resolve checkdepends or run the check function" + }, + { + "name": "--installdebug", + "description": "Also install debug packages when a package provides them" + }, + { + "name": "--noinstalldebug", + "description": "Don't install debug packages when a package provides them" }, { "name": "--upgrademenu", @@ -1601,18 +1748,25 @@ } }, { - "name": "--builddir", - "description": "Directory used to download and run PKGBUILDs", + "name": "--makepkg", + "description": "Makepkg command to use", "args": { - "name": "dir", - "template": "folders" + "name": "file" } }, { - "name": "--makepkg", - "description": "Makepkg command to use", + "name": "--makepkgconf", + "description": "Specify a makepkg.conf file to use in the chroot environment", "args": { - "name": "file" + "name": "file", + "template": "filepaths" + } + }, + { + "name": "--mflags", + "description": "Pass arguments to makepkg", + "args": { + "name": "flags" } }, { @@ -1636,6 +1790,13 @@ "name": "file" } }, + { + "name": "--gitflags", + "description": "Pass arguments to git", + "args": { + "name": "flags" + } + }, { "name": "--asp", "description": "Asp command to use", @@ -1650,6 +1811,56 @@ "name": "file" } }, + { + "name": "--gpgflags", + "description": "Pass arguments to gpg", + "args": { + "name": "flags" + } + }, + { + "name": "--sudo", + "description": "Sudo command to use", + "args": { + "name": "file" + } + }, + { + "name": "--sudoflags", + "description": "Pass arguments to sudo", + "args": { + "name": "flags" + } + }, + { + "name": "--sudoloop", + "description": "Periodically call sudo in the background to prevent it from timing out during long builds" + }, + { + "name": "--nosudoloop", + "description": "Do not loop sudo calls in the background" + }, + { + "name": "--pkgctl", + "description": "Pkgctl command to use", + "args": { + "name": "file" + } + }, + { + "name": "--bat", + "description": "Bat command to use", + "args": { + "name": "file" + } + }, + { + "name": "--batflags", + "description": "Pass arguments to bat", + "args": { + "name": "flags" + } + }, { "name": "--fm", "description": "File manager to use for PKGBUILD review", @@ -1658,12 +1869,83 @@ } }, { - "name": "--pager", - "description": "Pager command to use", + "name": "--fmflags", + "description": "Pass arguments to file manager", "args": { - "name": "file" + "name": "flags" + } + }, + { + "name": "--chroot", + "description": "Build packages in a chroot. Requires --localrepo", + "args": { + "name": "path", + "template": "folders", + "isOptional": true + } + }, + { + "name": "--nochroot", + "description": "Don't build packages in a chroot" + }, + { + "name": "--chrootflags", + "description": "Pass arguments to makechrootpkg", + "args": { + "name": "flags" + } + }, + { + "name": "--chrootpkgs", + "description": "Install package(s) into the chroot before building", + "args": { + "name": "package" + } + }, + { + "name": "--localrepo", + "description": "Use a local repo to build and upgrade AUR packages", + "args": { + "name": "repos", + "isOptional": true + } + }, + { + "name": "--nolocalrepo", + "description": "Do not build into a local repo" + }, + { + "name": "--keeprepocache", + "description": "Keep old package versions in the local repo instead of removing them on update" + }, + { + "name": "--nokeeprepocache", + "description": "Don't keep old packages in the local repo" + }, + { + "name": "--sign", + "description": "Sign packages with gpg", + "args": { + "name": "key", + "isOptional": true } }, + { + "name": "--nosign", + "description": "Don't sign packages with gpg" + }, + { + "name": "--signdb", + "description": "Sign databases with gpg", + "args": { + "name": "key", + "isOptional": true + } + }, + { + "name": "--nosigndb", + "description": "Don't sign databases with gpg" + }, { "name": "--skipreview", "description": "Skip the review process" From 39090379d5d2485462a765cf98e5caefc6fe84bd Mon Sep 17 00:00:00 2001 From: Oz Date: Fri, 14 Aug 2026 01:51:54 +0000 Subject: [PATCH 2/2] Ground the paru.json audit in the v2.1.0 parser, not --help/man page Re-did the audit against src/command_line.rs and src/config.rs at the v2.1.0 tag (the argument parser and its enum value tables), which is the actual source of truth for what the CLI accepts. --help and the man page are both incomplete/stale in places. Corrections: - Restored `--builddir`: it's a real accepted alias of `--clonedir` (command_line.rs:188, both map to build_dir; both Required in takes_value()). Wrongly removed in the previous commit based on its absence from the man page/--help. - Restored `--pager`: a real accepted flag (command_line.rs:185, self.pager_cmd = Some(value?.to_string())), not merely the PARU_PAGER env var. Also wrongly removed. - Added `--develfile`: accepted (command_line.rs:189) but was never modeled at all. - Added `--noinstall` under -B/--build and -C/--chrootctl, pairing the existing -i/--install local options (command_line.rs:297, self.no_install = true). - Added `--nonewsonupgrade`, the missing negation of --newsonupgrade (command_line.rs:301). - `--sudoloop` takes an optional free-form argument (takes_value: Optional; parser splits it on whitespace), not a bare flag. - `--provides` takes an optional yes/no/all argument (takes_value: Optional, YesNoAll enum), not a bare flag. - `--chroot`'s description no longer claims it requires --localrepo; the parser doesn't couple the two, and paru v2.0.0 already dropped that requirement. - `--searchby`'s value set corrected to match `ConfigEnum for raur::SearchBy` exactly: checkdepends, depends, maintainer, makedepends, name-desc, name, submitter, provides, replaces, groups, keywords, comaintainers. Removed "optdepends", which isn't a valid value in v2.1.0; added the six AUR-metadata fields (submitter/provides/replaces/groups/keywords/comaintainers) that were missing. - `--mode` now includes the "all" value and notes the a/r/p shorthand forms accepted by its FromStr impl (config.rs), without enumerating every combination. Verified `--editor`/`--editorflags` are dead entries in the parser (listed in takes_value() but never matched in handle_arg(), so both error as "unknown option" at runtime) and correctly left unmodeled. Co-Authored-By: Warp Agent --- command-signatures/json/paru.json | 71 ++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/command-signatures/json/paru.json b/command-signatures/json/paru.json index 17fdc247..bb0800d2 100644 --- a/command-signatures/json/paru.json +++ b/command-signatures/json/paru.json @@ -1235,6 +1235,10 @@ ], "description": "Install a package into the chroot" }, + { + "name": "--noinstall", + "description": "Do not install a package into the chroot" + }, { "name": [ "-u", @@ -1262,6 +1266,10 @@ ], "description": "Install a package into the chroot" }, + { + "name": "--noinstall", + "description": "Do not install a package into the chroot" + }, { "name": [ "-u", @@ -1288,6 +1296,10 @@ "--install" ], "description": "Install package as well as building" + }, + { + "name": "--noinstall", + "description": "Do not install the package once built" } ], "isVariadic": true, @@ -1307,6 +1319,10 @@ "--install" ], "description": "Install package as well as building" + }, + { + "name": "--noinstall", + "description": "Do not install the package once built" } ], "isVariadic": true, @@ -1467,14 +1483,15 @@ }, { "name": "--mode", - "description": "Select what kinds of packages paru should act on", + "description": "Select what kinds of packages paru should act on. Also accepts a/r/p shorthand, combinable and comma-separated (e.g. ar, a,r)", "isPersistent": true, "args": { "name": "mode", "suggestions": [ "aur", "repo", - "pkgbuilds" + "pkgbuilds", + "all" ] } }, @@ -1551,7 +1568,12 @@ "depends", "checkdepends", "makedepends", - "optdepends" + "submitter", + "provides", + "replaces", + "groups", + "keywords", + "comaintainers" ] } }, @@ -1577,13 +1599,24 @@ } }, { - "name": "--clonedir", + "name": [ + "--clonedir", + "--builddir" + ], "description": "Directory used to download and run PKGBUILDs", "args": { "name": "dir", "template": "folders" } }, + { + "name": "--develfile", + "description": "Path to the file used to track devel package versions", + "args": { + "name": "file", + "template": "filepaths" + } + }, { "name": "--topdown", "description": "Print search results from top to bottom, with repository packages first (default)" @@ -1594,7 +1627,16 @@ }, { "name": "--provides", - "description": "Look for matching providers when searching for AUR packages" + "description": "Look for matching providers when searching for AUR packages", + "args": { + "name": "mode", + "suggestions": [ + "yes", + "no", + "all" + ], + "isOptional": true + } }, { "name": "--noprovides", @@ -1628,6 +1670,10 @@ "name": "--newsonupgrade", "description": "Print new news during sysupgrade" }, + { + "name": "--nonewsonupgrade", + "description": "Don't print new news during sysupgrade" + }, { "name": "--combinedupgrade", "description": "Refresh then perform the repo and AUR upgrade together" @@ -1834,7 +1880,11 @@ }, { "name": "--sudoloop", - "description": "Periodically call sudo in the background to prevent it from timing out during long builds" + "description": "Periodically call sudo in the background to prevent it from timing out during long builds", + "args": { + "name": "args", + "isOptional": true + } }, { "name": "--nosudoloop", @@ -1875,9 +1925,16 @@ "name": "flags" } }, + { + "name": "--pager", + "description": "Pager command to use for file review", + "args": { + "name": "command" + } + }, { "name": "--chroot", - "description": "Build packages in a chroot. Requires --localrepo", + "description": "Build packages in a chroot", "args": { "name": "path", "template": "folders",