depends: replace `map` with for loop
[aurutils.git] / man1 / aur-query.1
blobe8f5fc9caa3db425da1df4e5e215ad21f7ddb49b
1 .TH AUR-QUERY 1 2022-08-16 AURUTILS
2 .SH NAME
3 aur\-query \- send requests to the aurweb RPC interface
5 .SH SYNOPSIS
6 .SY "aur query"
7 .OP \-t type
8 .OP \-b by
9 .OP \-n
10 .IR pkgname " [" pkgname... ]
11 .YS
13 .SH DESCRIPTION
14 .B aur\-query
15 retrieves package information from an AUR endpoint by sending HTTP POST
16 requests to the
17 .UR https://\:aur.archlinux.org/\:rpc.php
18 RPC interface
19 .UE
20 with
21 .BR curl(1).
22 .PP
23 Arguments are taken from the command-line. If the first argument is
24 .B \-
26 .BR /dev/stdin ,
27 arguments are taken from standard input. JSON responses are delimited by
28 newlines (JSON Lines).
30 .SH OPTIONS
31 The request type and arguments must be compatible to the chosen RPC version (see the
32 .B AUR_QUERY_RPC_VERSION
33 environment variable). The options below assume
34 .BR "RPC v5" .
36 .TP
37 .BR \-b ", " \-\-by=\fR<KIND>
38 Arguments for package search
39 .RB ( \-\-type=search ).
40 Can be one of
41 .BR name ,
42 .BR name\-desc ,
43 .BR maintainer ,
44 .BR depends ,
45 .BR makedepends ,
46 .BR optdepends ,
48 .BR checkdepends .
50 .TP
51 .BR \-t ", " \-\-type=\fR<NAME>
52 Type of request. Can be one of
53 .BR search ,
54 .BR info ,
56 .BR suggest .
58 .SH EXIT STATUS
59 .B aur\-query
60 returns 0 if no errors occurred, 1 if an invalid option or no
61 arguments were supplied, and 2 on a
62 .BR curl (1)
63 error.
65 .SH ENVIRONMENT
66 .TP
67 .B AUR_LOCATION
68 The URI of the AUR endpoint. Defaults to
69 .IR https://\:aur.archlinux.org .
71 .TP
72 .B AUR_QUERY_RPC
73 The URI of the RPC interface. Defaults to
74 .IR "$AUR_LOCATION/rpc/?v=5" .
76 .TP
77 .B AUR_QUERY_RPC_SPLITNO
78 The amount of packages in the message body when using HTTP POST for
79 info-type requests. Defaults to
80 .IR 5000 .
81 This value should not be set higher than 5000, the maximum amount of
82 package results in an
83 .B info
84 request.
86 .TP
87 .B AUR_QUERY_RPC_VERSION
88 The version for the RPC endpoint. Defaults to
89 .IR 5 .
91 .TP
92 .B AUR_DEBUG
93 Display
94 .BR curl (1)
95 command-lines prior to running them.
97 .SH NOTES
98 The default set of options for
99 .BR curl (1)
101 .BR "\-A aurutils \-fgLsSq" .
103 .SH SEE ALSO
104 .ad l
106 .BR aur\-depends (1),
107 .BR aur\-search (1),
108 .BR aur\-vercmp (1),
109 .BR curl (1),
111 .SH AUTHORS
112 .MT https://github.com/AladW
113 Alad Wenter
116 .\" vim: set textwidth=72: