On MacOS Homebrew https://brew.sh is the defacto package manager to install Apps or CLIs.
Using npm for distributing the cli has some downsides
One I ran into today was that:
I use fnm to manage Node versions, which keeps multiple versions of Node and NPM and depending on the project needs it switches to the correct version using symlinks.
Since the cli is installed globally and the npm stores that in a folder scoped to a specific Node version, when I try to use the cli in a different repo which uses a different version of Node (and hence npm) the socket cli is not found.
With Homebrew distribution, the whole system gets the same socket cli version, unlike Node, Homebrew is installed system-wide and doesn't change per-project.
On MacOS Homebrew https://brew.sh is the defacto package manager to install Apps or CLIs.
Using npm for distributing the cli has some downsides
One I ran into today was that:
I use fnm to manage Node versions, which keeps multiple versions of Node and NPM and depending on the project needs it switches to the correct version using symlinks.
Since the cli is installed globally and the
npmstores that in a folder scoped to a specific Node version, when I try to use the cli in a different repo which uses a different version of Node (and hence npm) the socket cli is not found.With Homebrew distribution, the whole system gets the same socket cli version, unlike Node, Homebrew is installed system-wide and doesn't change per-project.