um-fish

um-fish installs, updates, lists and removes the um fish tools. The tools are the fish functions published at tools.u-m.me; the manifest at that site names every file, its SHA-256 digest and the version.

Setup

um-fish needs fish, curl, jq and sha256sum. Install and update download over HTTPS and verify each file against the manifest before any file on disk is replaced. uninstall and list are local operations and need nothing but fish.

Files install into ~/.config/fish/functions. The installed manifest is kept at ~/.config/fish/um-fish/installed.json; uninstall and list read that copy. The manifest URL defaults to https://tools.u-m.me/manifest.json and can be overridden with the UM_TOOLS_URL variable.

Commands

install

Downloads the current manifest, verifies and installs every file, and records the manifest locally. Refuses to run when a version is already installed; use update for that case.

update

Repeats the install flow. When a previous version is recorded, update prints the version transition, for example updated: 1.0.0 -> 1.1.0.

list

Prints the installed version and the installed file names. Exits with an error when nothing is installed.

uninstall

Removes every file named in the installed manifest, then removes the state directory. Shells that already loaded the functions keep them in memory until restarted. uninstall needs the local state file; it performs no downloads.

Install one-liner

curl -fsSL https://tools.u-m.me/install.fish -o /tmp/install.fish
fish /tmp/install.fish install

install.fish is generated from um-fish.fish at publish time; both accept the same subcommands, so the downloaded script can also be invoked as fish /tmp/install.fish update|uninstall|list.