Skip to content

Command-line interface


Starting 4.0.0 version, Grabber can be run through the command line.


There are two ways to use the command line.

When compiling Grabber, just uncomment "CONFIG += use_cli" to set the CLI to be the default behavior. The downside is that running it in GUI mode with the "-g" or "--gui" command will pop up a console too if not run from a terminal already.

If you keep it commented or just use the precompiled version, Grabber will start with its GUI by default, which can be disabled with the "-c" or "--cli" commands.


In this part, I'll consider that you are using the precompiled version, which has "CONFIG += use_cli" commented.


You can find help with the "-?", "-h", or "--help" commands.


You can set a source using the "-s" or "--sources" parameter, followed by the list of hosts to connect, separated by spaces. For example:

./grabber -c -s ""


Count the number of images

Prints the result followed by a new line to stdout.

./grabber -c -t "inugami_kira" -s "" --return-count

./grabber -c -t "inugami_kira" -s "" --return-count

./grabber -c -t "inugami_kira" -s "" --return-count

Get tags

Prints each result separated by a new line. Each part is separated by a tabulation character.

./grabber -c -t "inugami_kira" -s "" --return-tags
inugami_kira    288     artist
highres 458000  general
1girl   1090000 general
absurdres       87000   general
thighhighs      257000  general

./grabber -c -t "inugami_kira" -s "" --return-tags
inugami_kira    585     artist
highres 1078790 general
1girl   1736509 general
absurdres       203970  general
thighhighs      613879  general

Get images


Prints each result separated by a new line.

./grabber -c -t "inugami_kira" -s "" -i 5 -p 3 --return-images

./grabber -c -t "inugami_kira" -s "" -i 5 -p 3 --return-images

./grabber -c -t "inugami_kira" -s "" -i 5 -p 3 --return-images


You can use the "-n" or "--no-duplicates" option to remove duplicate results when downloading from several sources based on MD5.

./grabber -c -t "inugami_kira" -s "" -i 5 -p 3 --return-images --no-duplicates

Images per page

You can use the "-i" or "--perpage" option to choose how many images per page the program should return. The default value is 20.

You can use the "-m" or "--max" option to choose how many images you want to return. By default, the program returns everything it finds on the requested pages.

Mixed together, they can allow you to get multiple pages for a single request. For example, "-i 2 -m 10" will return the same result as "-i 10", but will use 5 requests to do so.

./grabber -c -t "inugami_kira" -s "" -i 10 --return-images

./grabber -c -t "inugami_kira" -s "" -i 2 -m 10 --return-images

Get tags list


Prints each result separated by a new line.

./grabber -c -s "" -i 5 --return-pure-tags
tsukimare_mitsuki       1       artist
pukapukapukka2007       1       artist
aria1211        1       artist
ksnatc-t_am     1       artist
joyacuson       1       artist

Count filter

You can use the "--tm" or "--tags-min" to return only tags with a count superior or equal to this option.

./grabber -c -s "" -i 100 --tags-min 10 --return-pure-tags
emererre        10      artist
hitsuji_(hitsuji_kikaku)        12      artist
hitomi_(pokemon_ranger) 11      character
seneo   41      artist

Tags format

You can use the "--tf" or "--tags-format" to change the format tags are returned.

Available replacements are "%tag", "%count", "%type" and "%stype".

The default value is "%tag\t%count\t%type"

./grabber -c -s "" -i 100 --tags-format "%stype %tag (%count)" --tags-min 10 --return-pure-tags
1 emererre (10)
1 hitsuji_(hitsuji_kikaku) (12)
4 hitomi_(pokemon_ranger) (11)
1 seneo (41)


Update the auto-completion list manually

Note that this is long and very constraining for the server. So please don't overdo it. The software already automatically updates the tag list as they arrive. This is just if you notice that many of your searched tags are not in the list.

It can take a while (250 pages of 500ko each), so you might want to turn debugging on to see the current download status.

./grabber -c -s "" -i 1000 -m 250000 --tags-format "%tag" --tags-min 10 --return-pure-tags > tags.txt

Last update: November 19, 2023