auth0-cli
auth0-cli copied to clipboard
Please provide a non-homebrew solution for linux
Hi Auth0 team
Describe the problem you'd like to have solved
Homebrew is not a common tool on Linux systems. It is very heavy handed, doesn't work well, and interferes with many other parts of the OS in clobbering harmful ways! Overall Homebrew's implementation for Linux is an afterthought and it shouldn't be encouraged/promoted.
Describe the ideal solution
There are other package managers available - apt, yum, flatpak, snapcraft, pip, - and if there is no motivation to use a package manager, even a regular set of instructions to manually install the binary would be preferable. Or maybe even a curl ... | bash statement.
Alternatives and current work-arounds
Users should follow the manual steps.
Hey @mendhak thanks for opening this issue. I do reflect your sentiment regarding Homebrew on Linux, however we currently provide instructions on how to manually install the binary on Linux as well: https://github.com/auth0/auth0-cli#manually-2. Please let us know if you had any issues with that.
Meanwhile I'll leave this issue open so we can investigate using curl to read a bash script that installs the binary automatically.
Hello. We're trying out Auth0, and the Linux instructions for installing the cli weren't quite working out-of-the-box. Rather than dig in, we're trying the Homebrew solution, and it too is less than ideal.
As pointed out above, there are native, idiomatic Linux package managers which would make the installation process less painful. This is just feedback that the choice between incomplete manual instructions and requiring the download of a whole other MacOS package-manager does not leave a good first impression.
Barring that, your team may want to follow the manual installation instructions on a clean install of Linux. Where there are permission or PATH issues not covered in the instructions, to add those. Specifically, there is a Permission denied error at the line
sudo ./auth0 completion bash > /etc/bash_completion.d/auth0
After addressing that, the path to the binary needs to be added to the PATH environment variable so that the command auth0 works globally. For example, Homebrew, for its part, has these instructions after install:
==> Next steps:
- Run these three commands in your terminal to add Homebrew to your PATH:
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /home/{user}/.profile
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/{user}/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
Edit: After looking into the manual instructions further, I'm sure they would not work anyway. For instance, /etc/bash_completion.d/auth0 is not automatically run when bash starts.
Hey @rendall 👋🏻 appreciate the feedback. 🙇🏻
We acknowledged this issue on linux and aimed at improving it in our https://github.com/auth0/auth0-cli/tree/v1 branch.
The new advised way of installing the binary on linux is by curling and executing our install script.
You could already take advantage of it by running:
# Binary will be downloaded to "./auth0".
curl -sSfL https://raw.githubusercontent.com/auth0/auth0-cli/v1/install.sh | sh -s -- -b .
This however does not export it on the PATH env var. I'm a bit hesitant to tweak the install script to already download the binary to a place like $HOME/bin/auth0 as that might not be intended for all use cases. But adding a note about how to export it makes sense, wdyt? 🤔
As pointed out above, there are native, idiomatic Linux package managers which would make the installation process less painful. This is just feedback that the choice between incomplete manual instructions and requiring the download of a whole other MacOS package-manager does not leave a good first impression.
👍🏻 Completely agreed, even tho the install script is a good step in the right direction, support for Linux package managers will come later on this year.
Edit: After looking into the manual instructions further, I'm sure they would not work anyway. For instance, /etc/bash_completion.d/auth0 is not automatically run when bash starts.
Thanks, I'll look into this as well!
But adding a note about how to export it makes sense, wdyt?
I think this would really help. I for one never remember exactly what to do, so I have to look it up every time 🙈
Completely agreed, even tho the install script is a good step in the right direction, support for Linux package managers will come later on this year.
Great news. I'm glad the feedback was accepted so well.
And, I do have to say, once Homebrew was downloaded and installed, installation worked out of the box. 👍🏻
Some really good discourse here, it's all been noted. Per the spirit of this ticket, we've updated the readme to include non-homebrew linux instructions. As such, I'm going to close this issue. If anyone has any additional feedback, feel empowered to open a dedicated issue. Thanks!
Thanks for that, it is appreciated.