appstreamcli is a small helper tool to work with AppStream metadata and access the AppStream component index from the command-line. The AppStream component index contains a list of all available software components for your distribution, matched to their package names. It is generated using AppStream XML or Debian DEP-11 data, which is provided by your distributor.
s, search TERM
what-provides TYPE TERM
Get components which handle the "text/xml" mediatype.
appstreamcli what-provides mediatype "text/xml"
Get component which provides the "libfoo.so.2" library.
appstreamcli what-provides lib libfoo.so.2
This command must be executed with root permission.
Both XML metadata types, upstream and distro XML, are handled. The filetype which should be validated is determined automatically.
The --pedantic flag triggers a more pedantic validation of the file, including minor and style issues in the report.
This performs a standard validation of all found metadata, but also checks for additional errors, like the presence of .desktop files and validity of other additional metadata.
This resolves the AppStream component ID to the package name which provides it and then calls the distribution's package manager to install the software.
This feature is experimental.
compare-versions VER1 [CMP] VER2
If a version number, a comparison operator and another version number are passed in as parameter, the result of the comparison operation will be printed to stdout, and appstreamcli will exit with a non-zero exit status in case the comparison failed. The comparison operator can be one of the following:
new-template TYPE FILE
The generated files contain example entries which need to be filed in with the actual desired values by the project author.
The first TYPE parameter is the name of an AppStream component type. For a complete list check out m[blue]the documentationm or the help output of appstreamcli for this subcommand.
make-desktop-file MI_FILE DESKTOP_FILE
This command will use the first binary mentioned in a provides tag of the component for the Exec= field of the new desktop-entry file. If this is not the desired behavior, the --exec flag can be used to explicitly define a binary to launch. Other methods of launching the application are currently not supported.
In order to generate a proper desktop-entry, this command assumes that not only the minimally required tags for an AppStream component are set, but also that it has an <icon/> tag of type "stock" to describe the stock icon that should be used as well as a <categories/> tag containing the categories the application should be placed in.
news-to-metainfo NEWS_FILE MI_FILE [OUT_FILE]
The --format option can be used to enforce reading the input file in a specific format ("text" or "yaml") in case the format autodetection fails. The --limit option is used to limit the amount of release entries written (the newest entries will always be first).
metainfo-to-news MI_FILE NEWS_FILE
The --format option can be used to explicitly specify the output format ("yaml" or "text"). If it is not set, appstreamcli will guess which format is most suitable.
The same effect can be achieved by setting the AS_VALIDATE_NONET environment variable before running appstreamcli.
This manual page was written by Matthias Klumpp <email@example.com>.