Skip to main content

Usage

Query — generate .refs files by category

fhtoolkit query [-c CATEGORY ...] [--all] [--dump-categories]
[--arch ARCH] [--branch BRANCH] [--out OUT] [--merge-to MERGE_TO]
FlagMeaning
-c / --categoryRepeatable — pick specific categories (default: x86_64 arch, stable branch)
--allGenerate refs for every category
--dump-categoriesList available categories without generating anything
--archFlatpak architecture (default x86_64)
--branchFlatpak branch (default stable)
--outOutput directory for *.refs files (default refs)
--merge-toMerge all selected category refs into a single combined file

Example — list categories, then generate refs for two of them into a merged file:

fhtoolkit query --dump-categories
fhtoolkit query -c Development -c Utility --merge-to refs/dev-and-utility.refs

Download — fetch .flatpakref descriptors

fhtoolkit download [--refs-file FILE ...] [--refs-dir DIR] [--out OUT]
[--skip-existing / --no-skip-existing] [--throttle SECONDS]
[--limit N] [--timeout SECONDS]
FlagMeaning
--refs-file / -fRepeatable — one or more specific .refs files
--refs-dirA directory of .refs files instead of naming them individually
--outOutput directory for descriptors (default flatpakrefs)
--skip-existingDefault true — don't re-download descriptors already present
--no-skip-existingForce re-download
--throttleDelay between downloads, in seconds
--limitCap the number of descriptors downloaded (0 = unlimited)
--timeoutPer-request timeout, in seconds (default 30)

Example:

fhtoolkit download --refs-dir refs/ --out flatpakrefs/ --throttle 0.5

Legacy standalone scripts

Query.py and Download.py at the repo root are preserved wrappers around the same underlying logic, kept for backward compatibility. The packaged fhtoolkit CLI is the preferred entry point going forward — the standalone scripts should be treated as compatibility shims, not the primary interface.