1APPSTREAMCLI(1)                  appstreamcli                  APPSTREAMCLI(1)
2
3
4

NAME

6       appstreamcli - Handle AppStream metadata formats and query AppStream
7       data
8

SYNOPSIS

10       appstreamcli [COMMAND]
11

DESCRIPTION

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

OPTIONS

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       check-license LICENSE
79           Test a license string for validity and display details about it.
80
81           This will check whether the license string is considered to be
82           valid for AppStream, and return a non-zero exit code if it is not.
83           The command will also display useful information like the canonical
84           ID of a license, whether it is suitable as license for AppStream
85           metadata, and whether the license is considered to be for Free and
86           Open Source software or proprietary software.
87
88           AppStream will consider any license as Free and Open Source that is
89           marked as suitable by either the Free Software Foundation (FSF),
90           Open Source Initiative (OSI) or explicit license list of the Debian
91           Free Software Guidelines (DFSG).
92
93       install ID
94           Install a software component by its ID.
95
96           This resolves the AppStream component ID to the package name which
97           provides it and then calls the distribution's package manager to
98           install the software.
99
100           This feature is experimental.
101
102       put FILE
103           Install a metadata file into the right directory on the current
104           machine.
105
106       compare-versions VER1 [CMP] VER2
107           Compare two version numbers. If two version numbers are given as
108           parameters, the versions will be compared and the comparison result
109           will be printed to stdout.
110
111           If a version number, a comparison operator and another version
112           number are passed in as parameter, the result of the comparison
113           operation will be printed to stdout, and appstreamcli will exit
114           with a non-zero exit status in case the comparison failed. The
115           comparison operator can be one of the following:
116
117           •   eq - Equal to
118
119           •   ne - Not equal to
120
121           •   lt - Lesser than
122
123           •   gt - Greater than
124
125           •   le - Lesser than or equal to
126
127           •   ge - Greater than or equal to
128
129       new-template TYPE FILE
130           Create a metainfo file template to be used by software projects.
131           The --from-desktop option can be used to use a .desktop file as
132           template for generating the example file.
133
134           The generated files contain example entries which need to be filed
135           in with the actual desired values by the project author.
136
137           The first TYPE parameter is the name of an AppStream component
138           type. For a complete list check out the documentation[2] or the
139           help output of appstreamcli for this subcommand.
140
141       make-desktop-file MI_FILE DESKTOP_FILE
142           Create a XDG desktop-entry file from a metainfo file. If the
143           desktop-entry file specified in DESKTOP_FILE already exists, it
144           will get extended with the new information extracted from the
145           metainfo file. Otherwise a new file will be created.
146
147           This command will use the first binary mentioned in a provides tag
148           of the component for the Exec= field of the new desktop-entry file.
149           If this is not the desired behavior, the --exec flag can be used to
150           explicitly define a binary to launch. Other methods of launching
151           the application are currently not supported.
152
153           In order to generate a proper desktop-entry, this command assumes
154           that not only the minimally required tags for an AppStream
155           component are set, but also that it has an <icon/> tag of type
156           "stock" to describe the stock icon that should be used as well as a
157           <categories/> tag containing the categories the application should
158           be placed in.
159
160       news-to-metainfo NEWS_FILE MI_FILE [OUT_FILE]
161           This command converts a NEWS file as used by many open source
162           projects into the XML used by AppStream. Since NEWS files are free
163           text, a lot of heuristics will be applied to get reasonable
164           results. The converter can also read a YAML version of the
165           AppStream release description and convert it to XML as well. If the
166           metainfo file MI_FILE already exists, it will be augmented with the
167           new release entries, otherwise the release entries will be written
168           without any wrapping component. If [OUT_FILE] is specified, instead
169           of acting on MI_FILE the changed data will be written to the
170           particular file. If any of the output filenames is set to "-", the
171           output will instead be written to stdout.
172
173           The --format option can be used to enforce reading the input file
174           in a specific format ("text" or "yaml") in case the format
175           autodetection fails. The --limit option is used to limit the amount
176           of release entries written (the newest entries will always be
177           first).
178
179       metainfo-to-news MI_FILE NEWS_FILE
180           This command reverses the news-to-metainfo command and writes a
181           NEWS file as text or YAML using the XML contained in a metainfo
182           file. If NEWS_FILE is set to "-", the resulting data will be
183           written to stdout instead of to a file.
184
185           The --format option can be used to explicitly specify the output
186           format ("yaml" or "text"). If it is not set, appstreamcli will
187           guess which format is most suitable.
188
189       --details
190           Print out more information about a found component.
191
192       --no-color
193           Don't print colored output.
194
195       --no-net
196           Do not access the network when validating metadata.
197
198           The same effect can be achieved by setting the AS_VALIDATE_NONET
199           environment variable before running appstreamcli.
200
201       --version
202           Display the version number of appstreamcli
203

SEE ALSO

205       pkcon (1).
206

AUTHOR

208       This manual page was written by Matthias Klumpp
209       <matthias@tenstral.net>.
210
212       Copyright © 2012-2021 Matthias Klumpp
213

NOTES

215        1. Freedesktop.org
216           https://www.freedesktop.org/wiki/Distributions/AppStream/
217
218        2. the documentation
219           https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html
220
221
222
223AppStream                                                      APPSTREAMCLI(1)
Impressum