j178 / chatgpt

An elegant interactive CLI for ChatGPT
693 stars 52 forks source link

command not found: chatgpt (macOS, installed with Homebrew) #77

Closed inspiredearth closed 9 months ago

inspiredearth commented 9 months ago

Hello.

I used Homebrew to install, as per your instructions. E.g. brew install j178/tap/chatgpt.

The output indicated it was installed. As seen here:

==> Tapping j178/tap
Cloning into '/opt/homebrew/Library/Taps/j178/homebrew-tap'...
remote: Enumerating objects: 226, done.
remote: Counting objects: 100% (72/72), done.
remote: Compressing objects: 100% (72/72), done.
remote: Total 226 (delta 45), reused 0 (delta 0), pack-reused 154
Receiving objects: 100% (226/226), 37.32 KiB | 597.00 KiB/s, done.
Resolving deltas: 100% (137/137), done.
Tapped 3 formulae (16 files, 54KB).
==> Fetching j178/tap/chatgpt
==> Downloading https://github.com/j178/chatgpt/releases/download/v1.2.1/chatgpt_Darwin_arm64.tar.gz
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/608593901/86c05f9a-6c48-4fe5
####################################################################################################################### 100.0%
==> Installing chatgpt from j178/tap
==> chatgpt cask is installed, skipping link.
🍺  /opt/homebrew/Cellar/chatgpt/1.2.1: 4 files, 21MB, built in 3 seconds
==> Running `brew cleanup chatgpt`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
jonathan@Jonathan-MBA /Users/jonathan $ export OPENAI_API_KEY=(hidden)

When I try to use it, the command is not found:

jonathan@Jonathan-MBA /Users/jonathan $ chatgpt
zsh: command not found: chatgpt

Any suggestions?

j178 commented 9 months ago

In the output, you can see this line:

==> chatgpt cask is installed, skipping link.

This means that there is a chatgpt cask already installed, causing a conflict with this cli. As a result, brew skips adding the chatgpt to the $PATH. If you want to override this, you can use brew link chatgpt --overwrite.