Just throwing this out into the ether as a feature that I think would be nice - not as a priority or a need, more of a “this could be nice”.
Currently Hugo package management is brew on Mac, snap on linux, and nothing on Windows. As there is a great active core dev team at the moment, I (as lowly windows user on the verge taking the leap to linux) often find myself deleting, downloading, extracting to get access to etc.
While that really is not hard, it might nice to have an official node wrapper to manage hugo’s binary installs - versioning (extended or otherwise), easy updating, possibly even other features I can’t think of like dockerfile setups or something - from the command line using npm.
Sort of a universal package manager for Hugo installs - if that makes sense.
First, there are several “Windows package managers” with Hugo. Scoop seems to be closest to Brew on macOS, and is updated with the latest Hugo:
It doesn’t provide the “extended version”, but that should be fixable.
I have to concerns with your suggestion:
It somehow requires to run hugo via Node.js. This has its downsides and only make sense if you have hugo as part of a bigger node based workflow. Using it just to “get hugo” gives you the downsides, but very few upsides.
Managing an “official hugo-bin” or whatever you call it is a fair amount of work. We’re not staffed to do it, esp. if you consider 1).
Strikes me that scoop is like a poor man’s chocolatey. Oddly enough it is also rather like a poor-man’s npm.
I don’t see that it would be that difficult to build an npm-based installer and runner for Hugo. I already have a package.json file (npm’s configuration file) for running Hugo server, building a site and building a template. I did start to try to create a script to download the latest version of Hugo from GitHub as well but then the format changed somewhat and it broke the script so possibly not so sustainable.
Happy to share the package.json though anyone who has ever used npm would easily be able to create their own.
So my take on this is that we need a Node.JS, cross-platform script that takes parameters to download the latest version but we would also need an agreed folder layout so that everything works in a consistent way.
Happy to coordinate something if there was enough interest but I’m afraid I’ve too many projects running to take on developing the script.
Here is my package.json in case anyone is interested. I’m just using npm as a task runner.