0xacx / chatGPT-shell-cli

Simple shell script to use OpenAI's ChatGPT and DALL-E from the terminal. No Python or JS required.
https://gptshell.cc
MIT License
1.05k stars 150 forks source link

root requirement #57

Closed matbee-eth closed 1 year ago

matbee-eth commented 1 year ago

Why is root needed? Would be best to stick to user space and request the user to add PATH to bash_profile

Zeioth commented 1 year ago

The AUR guidelines advise not to install packages in ~/local/bin.

People on #Archlinux IRC redirected me here, so the convention is actually to install always on /usr/bin. And it specifically says, packages should not modify the /home directory (where .local/bin is).

/usr/local/usr is reserved for programs not managed by the package manager. So it makes sense for install.sh, but not for the AUR package. So I'm gonna change this.

Also, in case you want to make a program available only for certain users, the right way is to do it through user permissions, not through ~/.local/bin, this directory is for user scripts only.

Zeioth commented 1 year ago

In other words, root is always required when you install a program.

matbee-eth commented 1 year ago

Yeah, I'll just fork and put it in npm or such

0xacx commented 1 year ago

@matbee-eth Thank you for the interest! The script is installed in /usr/local/bin/ which is the default directory to install scripts on mac. Copying a file in /usr directory, requires super user privileges, thus the required use of sudo for the script. You can install it manually in any other directory and it will work, as long as you add it to $PATH.