The script I get the most personal use of is for one of the
most mundane things you can imagine—automating the repetitive process of keeping everything on my computer up to date. By "everything", I mean:
• my OS packages
• my OS-overlay packages (e.g. Homebrew, Nix)
• the versions of any standalone SDKs I use, that aren't maintained as OS packages (e.g. Rust from rustup, the Google Cloud SDK)
• any globally-installed packages for the package ecosystem of each language I install such stuff from (not libraries, but standalone utilities, e.g. youtube-dl in pip, or Foreman in Rubygems)
Here's the script: https://gist.github.com/tsutsu/270e09c68690ec85c51dbd054e22b...
I think automating this might help a lot of people, because people tend to forget that they even can update a lot of this stuff, or they don't know there's a command to get certain things to happen at all. (E.g. did you know that `brew cask upgrade` will switch out your application-bundles installed via casks with newer versions?)
I never polished it up, though, because it's still frail in some ways. (I still don't exactly trust the way it does pip package updates, for example; sometimes pip decides to upgrade packages into an inconsistent state where a package's deps get too new for it to use.)
But the idea is that you run this interactively, first thing in the morning when you sit down, in its own fresh terminal window, right after maybe letting your computer restart to update to a new OS version. It's like putting your workspace in order in the morning. It's doing the grunt work, but you're still making the decisions and fixing the exceptional conditions.
-----
I feel like this could be polished into a universal tool that'd literally update everything for everybody with one well-known command.
But, better yet, the problem could be reversed, and a standard for registering installed package ecosystems and their respective update/clean/etc. commands could be created, that installed ecosystems could register with by placing files in a directory (like e.g. pkg-config or bash-completion) such that this command could outsource its smarts to the ecosystem creators themselves.