Step request: Gear Lever (AppImage manager)
I use Gear Lever (Github) to manage my AppImages. It's primarily used to easily add appimages to a central location and automatically create .desktop files, as well as other management operations. However, it also has a feature where either the AppImage's developer or the user can specify an update url (either a static url or a release from github, gitlab and other sites) for each AppImage and Gear Lever can update them. I think it'd be useful to be able to update AppImages along with everything else using topgrade.
The tool is flatpak only, so as far as I can tell it should work on any linux distribution that supports flatpaks. It also has a cli which can be used to update the managed AppImages from the command line, which topgrade could use. It's invoked as follows to upgrade all AppImages: flatpak run it.mijorus.gearlever --update --all. The command shows a yes/no confirmation prompt (oddly enough it does so even if there's nothing to update) which can be skipped using a --yes option. An AppImage name can also be provided instead of the --all option to update a single AppImage. It does not appear to have a --dry-run or similar option.
I've been using topgrade for a while and it is incredibly convenient, so thanks for all the work!
Sounds simple enough, the only challenge is checking if it's installed, a simple require won't do. I don't use flatpak, is there a command to check whether it is installed?
Thanks for the quick response! Poking around, flatpak has an info command that errors if the package id provided is not installed and provides info if it is. For example:
- Installed package:
$ flatpak info it.mijorus.gearlever
Gear Lever - Manage AppImages
ID: it.mijorus.gearlever
Ref: app/it.mijorus.gearlever/x86_64/stable
Arch: x86_64
Branch: stable
Version: 3.3.4
License: GPL-3.0-or-later
Origin: flathub
Collection: org.flathub.Stable
Installation: system
Installed: 21,2 MB
Runtime: org.gnome.Platform/x86_64/47
Sdk: org.gnome.Sdk/x86_64/47
Commit: a88ca3469207cd1ee8dea91aefaee3ce2f6af9ff60d12879afc10d555c9b44c3
Parent: d327a95165ec779c57ff142bc9decff41c381c07565126cb36c54c56ad82c505
Subject: Merge pull request #117 from flathub/mijorus-patch-11 (d32e19d511d4)
Date: 2025-07-04 09:24:18 +0000
- Package not installed:
$ flatpak info org.gnome.Extensions
error: org.gnome.Extensions/*unspecified*/*unspecified* not installed
There's also a list command that lists installed packages. Using flatpak list --columns=applications:f to list the full app id of installed applications you get an output such as:
$ flatpak list --columns=application:f
Application ID
app.zen_browser.zen
ca.andyholmes.Valent
com.belmoussaoui.Decoder
com.belmoussaoui.Obfuscate
com.dec05eba.gpu_screen_recorder
com.discordapp.Discord
com.github.Matoking.protontricks
com.github.PintaProject.Pinta
com.github.finefindus.eyedropper
com.github.jeromerobert.pdfarranger
com.github.rafostar.Clapper.Enhancers
com.github.tchx84.Flatseal
com.mattjakeman.ExtensionManager
com.spotify.Client
com.vysp3r.ProtonPlus
de.philippun1.Snoop
de.schmidhuberj.tubefeeder
info.febvre.Komikku
io.bassi.Amberol
io.ente.auth
io.freetubeapp.FreeTube
io.github.nozwock.Packet
io.github.realmazharhussain.GdmSettings
io.gitlab.adhami3310.Converter
it.mijorus.gearlever
Thx, let's add require_flatpak that checks the status code of flatpak info <name>.
FYI, Gear Lever is also packaged in several different distros. The binary is /usr/bin/gearlever.
That means the flatpak stuff is only to be used as a fallback when require("gearlever") fails