a-Shell Package Installer Shortcut

Updated 09162022-155928


Social

well, I found myself creating a """GUI""" for the new package manager in the form of a Siri Shortcut today. https://routinehub.co/shortcut/12991


A Shortcuts GUI for a-Shell's package manager.

The source (commands) GitHub Repository: https://github.com/holzschu/a-Shell-commands

a-Shell Package Installer Shortcut
a-Shell Package Installer Shortcut

a-Shell's developer, @nholzschuch, just recently added a very simple package manager for installing add-on commands.

Here's the result of pkg --help:

Usage: pkg [install name] [remove name] [list] [search expression]
  install: installs package "name"
  remove: removes package "name"
  list: list all installed packages
  search: lists packages matching expression

  pkg will search for packages on $PKG_SERVER, if it set, and https://github.com/holzschu/a-Shell-commands otherwise

I created this shortcut to visualize and perhaps streamline the process (especially for non-command line-native folks like myself.)

Steps

  1. A Get Contents of URL action retrieves the latest list of available packages directly from the source file in the a-Shell Commands repository.
  2. A Choose from List action allows one to select multiple packages to install.
  3. The pkgs variable is set to a list of the chosen packages on a single line, separated by a single space.
  4. The chosen packages are installed with a single command: pkg install pkgs
  5. The second and final a-Shell command copies a list of all currently installed packages to the system clipboard: pkg list | pbcopy
  6. The list of all installed commands is presented in a Show Alert action.


Contact