1APPSTREAMCLI(1) appstreamcli APPSTREAMCLI(1)
2
3
4
6 appstreamcli - Handle AppStream metadata formats and query AppStream
7 data
8
10 appstreamcli [COMMAND]
11
13 This manual page documents briefly the appstreamcli command.
14
15 appstreamcli is a small helper tool to work with AppStream metadata and
16 access the AppStream component index from the command-line. The
17 AppStream component index contains a list of all available software
18 components for your distribution, matched to their package names. It is
19 generated using AppStream XML or Debian DEP-11 data, which is provided
20 by your distributor.
21
22 For more information about the AppStream project and the other
23 components which are part of it, take a look at the AppStream pages at
24 Freedesktop.org[1].
25
27 status
28 Display various information about the installed metadata and the
29 metadata cache.
30
31 get ID
32 Get a component by it's identifier.
33
34 s, search TERM
35 Search the AppStream component database for a given search term.
36
37 what-provides TYPE TERM
38 Return components which provide a given item. An item type can be
39 specified using the TYPE parameter, a value to search for has to be
40 supplied using the TERM parameter.
41
42 Examples:
43
44 Get components which handle the "text/xml" mediatype.
45
46 appstreamcli what-provides mediatype "text/xml"
47
48 Get component which provides the "libfoo.so.2" library.
49
50 appstreamcli what-provides lib libfoo.so.2
51
52 refresh, refresh-cache
53 Trigger a database refresh, if necessary. In case you want to force
54 the database to be rebuilt, supply the --force flag.
55
56 This command must be executed with root permission.
57
58 dump ID
59 Dump the XML description of a component with the given ID.
60
61 validate FILES
62 Validate AppStream XML metadata for compliance with the
63 specification.
64
65 Both XML metadata types, upstream and distro XML, are handled. The
66 filetype which should be validated is determined automatically.
67
68 The --pedantic flag triggers a more pedantic validation of the
69 file, including minor and style issues in the report.
70
71 validate-tree DIRECTORY
72 Validate AppStream XML metadata found in a file-tree.
73
74 This performs a standard validation of all found metadata, but also
75 checks for additional errors, like the presence of .desktop files
76 and validity of other additional metadata.
77
78 install ID
79 Install a software component by its ID.
80
81 This resolves the AppStream component ID to the package name which
82 provides it and then calls the distribution's package manager to
83 install the software.
84
85 This feature is experimental.
86
87 put FILE
88 Install a metadata file into the right directory on the current
89 machine.
90
91 compare-versions VER1 [CMP] VER2
92 Compare two version numbers. If two version numbers are given as
93 parameters, the versions will be compared and the comparison result
94 will be printed to stdout.
95
96 If a version number, a comparison operator and another version
97 number are passed in as parameter, the result of the comparison
98 operation will be printed to stdout, and appstreamcli will exit
99 with a non-zero exit status in case the comparison failed. The
100 comparison operator can be one of the following:
101
102 · eq - Equal to
103
104 · ne - Not equal to
105
106 · lt - Lesser than
107
108 · gt - Greater than
109
110 · le - Lesser than or equal to
111
112 · ge - Greater than or equal to
113
114 new-template TYPE FILE
115 Create a metainfo file template to be used by software projects.
116 The --from-desktop option can be used to use a .desktop file as
117 template for generating the example file.
118
119 The generated files contain example entries which need to be filed
120 in with the actual desired values by the project author.
121
122 The first TYPE parameter is the name of an AppStream component
123 type. For a complete list check out the documentation[2] or the
124 help output of appstreamcli for this subcommand.
125
126 make-desktop-file MI_FILE DESKTOP_FILE
127 Create a XDG desktop-entry file from a metainfo file. If the
128 desktop-entry file specified in DESKTOP_FILE already exists, it
129 will get extended with the new information extracted from the
130 metainfo file. Otherwise a new file will be created.
131
132 This command will use the first binary mentioned in a provides tag
133 of the component for the Exec= field of the new desktop-entry file.
134 If this is not the desired behavior, the --exec flag can be used to
135 explicitly define a binary to launch. Other methods of launching
136 the application are currently not supported.
137
138 In order to generate a proper desktop-entry, this command assumes
139 that not only the minimally required tags for an AppStream
140 component are set, but also that it has an <icon/> tag of type
141 "stock" to describe the stock icon that should be used as well as a
142 <categories/> tag containing the categories the application should
143 be placed in.
144
145 news-to-metainfo NEWS_FILE MI_FILE [OUT_FILE]
146 This command converts a NEWS file as used by many open source
147 projects into the XML used by AppStream. Since NEWS files are free
148 text, a lot of heuristics will be applied to get reasonable
149 results. The converter can also read a YAML version of the
150 AppStream release description and convert it to XML as well. If the
151 metainfo file MI_FILE already exists, it will be augmented with the
152 new release entries, otherwise the release entries will be written
153 without any wrapping component. If [OUT_FILE] is specified, instead
154 of acting on MI_FILE the changed data will be written to the
155 particular file. If any of the output filenames is set to "-", the
156 output will instead be written to stdout.
157
158 The --format option can be used to enforce reading the input file
159 in a specific format ("text" or "yaml") in case the format
160 autodetection fails. The --limit option is used to limit the amount
161 of release entries written (the newest entries will always be
162 first).
163
164 metainfo-to-news MI_FILE NEWS_FILE
165 This command reverses the news-to-metainfo command and writes a
166 NEWS file as text or YAML using the XML contained in a metainfo
167 file. If NEWS_FILE is set to "-", the resulting data will be
168 written to stdout instead of to a file.
169
170 The --format option can be used to explicitly specify the output
171 format ("yaml" or "text"). If it is not set, appstreamcli will
172 guess which format is most suitable.
173
174 --details
175 Print out more information about a found component.
176
177 --no-color
178 Don't print colored output.
179
180 --no-net
181 Do not access the network when validating metadata.
182
183 The same effect can be achieved by setting the AS_VALIDATE_NONET
184 environment variable before running appstreamcli.
185
186 --version
187 Display the version number of appstreamcli
188
190 pkcon (1).
191
193 This manual page was written by Matthias Klumpp
194 <matthias@tenstral.net>.
195
197 Copyright © 2012-2021 Matthias Klumpp
198
200 1. Freedesktop.org
201 https://www.freedesktop.org/wiki/Distributions/AppStream/
202
203 2. the documentation
204 https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html
205
206
207
208AppStream APPSTREAMCLI(1)