Search, Install And Update GNOME Shell Extensions From The Command Line Using gnome-extensions-cli

gnome-extensions-cli

gnome-extensions-cli is an unofficial GNOME Shell extension manager for the command line. It can install, update, enable / disable, remove and search GNOME Shell extensions.

This command line tool is great if you don't want or can't use a web browser (which requires also installing an extension and a connector) to install GNOME Shell extensions, and you like using the command line. 

If you prefer using a graphical user interface to manage GNOME Shell extensions (including installing new extensions, searching extensions on the GNOME Extensions website, updating installed extensions, etc.), check out Extension Manager.

gnome-extensions-cli can install GNOME Shell extensions available on the GNOME Extensions website using D-Bus or directly unzip packages from Gnome website in the ~/.local/share/gnome-shell/extensions/ folder. 

Using the D-Bus backend, the installation is interactive, prompting you if you wish to install the extension using a GNOME dialog, just like when using a web browser to install extensions. On X11, this also restarts GNOME Shell if needed (this does not work on Wayland). This doesn't work over ssh, for example, so in that case you can use the filesystem backend.

Available gnome-extensions-cli commands:

  • list: list enabled extensions. To list all installed extensions, including disabled ones, use list -a
  • search: search for extensions on the GNOME Shell extensions website
  • install: install extensions from the GNOME Shell extensions website
  • update: update extensions
  • uninstall: uninstall extensions
  • show: show details about extensions from the GNOME Shell extensions website
  • enable: enable extensions
  • disable: disable extensions
  • preferences: open the extension configuration window

Installing and updating extensions supports more than one extension as an argument. Also, to specify the extension you want to install or update, you can use the extension UUID (e.g., dash-to-panel@jderose9.github.com) or the package number from the GNOME Shell extension website (e.g., if the extension URL is https://extensions.gnome.org/extension/1160/dash-to-panel/, the extension package number is 1160).

It's also possible to update all installed extensions, by simply using the update command. Or, if you want to only update user extensions, use update --user.

When uninstalling, enabling, disabling or opening an extension's preferences, you can only specify it's UUID.

The search feature lists all extensions that match your query from the GNOME Shell extension website, including extensions that aren't compatible with your current Shell version. I'm hoping this will be improved in the future with an option to only return extensions that are officially supported on the GNOME Shell version that's used on the system performing the search. Meanwhile, you could limit the search results using -l NUMBER (e.g., search -l 10). 

The search results include the extension name, URL, screenshot link and creator name by default. To also list the extension description, append -v (search -v).


Install gnome-extensions-cli


The easiest way of installing gnome-extensions-cli is to use pipx. Install pipx from your Linux distribution repositories. For some popular Linux distributions, you'll find the command to install pipx below:

  • Debian, Ubuntu and Linux distributions based on these (Linux Mint, Elementary OS, Pop!_OS, Zorin OS, etc.):
sudo apt install pipx

  • Fedora:
sudo dnf install pipx

  • Arch Linux / Manjaro:
sudo pacman -S python-pipx

  • openSUSE:
sudo zypper install python-pipx

Now you can use pipx to install gnome-extensions-cli using the following command:

pipx install gnome-extensions-cli --system-site-packages

Start using this command line tool to manager GNOME Shell extensions, either using gnome-extensions-cli or gext. See the tool's help for details:

gnome-extensions-cli -h #or

gext -h