kardolus / chatgpt-cli

ChatGPT CLI is a versatile tool for interacting with ChatGPT models via OpenAI and Azure, as well as with models from Perplexity AI. It offers streaming, query mode, and history tracking for seamless, context-aware interactions. With extensive configuration options, it’s designed for both users and developers to create a tailored GPT experience.
MIT License
503 stars 34 forks source link

Naming conflict "chatgpt" (especially brew formula) #46

Closed iocron closed 4 months ago

iocron commented 4 months ago

There is a conflict when using the linker name "chatgpt" because an official Brew ChatGPT formula already exists: https://formulae.brew.sh/cask/chatgpt (=>https://github.com/j178/chatgpt). Wouldn't it simply be better to name it "chatgpt-cli"?

kardolus commented 4 months ago

Thanks for pointing this out! I will look into this after I bump the version.

kardolus commented 4 months ago

I'm currently unable to reproduce the issue. Here's my output (after doing brew upgrade):

2024-05-26 19:31:20 ⌚ (☸️ |kind:N/A) Guillermos-MacBook-Pro in ~/workspace/homebrew-chatgpt-cli
± |main ✓| → brew uninstall chatgpt-cli && brew untap kardolus/chatgpt-cli && brew tap kardolus/chatgpt-cli && brew install chatgpt-cli
Uninstalling /opt/homebrew/Cellar/chatgpt-cli/1.5.5... (4 files, 9.1MB)
Untapping kardolus/chatgpt-cli...
Untapped 1 formula (14 files, 22.8KB).
==> Tapping kardolus/chatgpt-cli
Cloning into '/opt/homebrew/Library/Taps/kardolus/homebrew-chatgpt-cli'...
remote: Enumerating objects: 115, done.
remote: Counting objects: 100% (115/115), done.
remote: Compressing objects: 100% (59/59), done.
remote: Total 115 (delta 27), reused 112 (delta 27), pack-reused 0
Receiving objects: 100% (115/115), 13.10 KiB | 3.28 MiB/s, done.
Resolving deltas: 100% (27/27), done.
Tapped 1 formula (14 files, 23.4KB).
==> Downloading https://formulae.brew.sh/api/formula.jws.json

==> Downloading https://formulae.brew.sh/api/cask.jws.json

==> Fetching kardolus/chatgpt-cli/chatgpt-cli
==> Downloading https://github.com/kardolus/chatgpt-cli/releases/download/v1.6.0/chatgpt-darwin-arm64
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/63493852
################################################################################################### 100.0%
==> Installing chatgpt-cli from kardolus/chatgpt-cli
==> Caveats
To enable history tracking across CLI calls, create a ~/.chatgpt-cli directory using the command:

mkdir -p ~/.chatgpt-cli

Additionally, set the OPENAI_API_KEY environment variable to your OpenAI API key:

export OPENAI_API_KEY="your_api_key"

You can add the above line to your shell profile (e.g., ~/.bashrc, ~/.zshrc, or ~/.bash_profile) to have the variable automatically set in new shell sessions.
==> Summary
🍺  /opt/homebrew/Cellar/chatgpt-cli/1.6.0: 4 files, 9.1MB, built in 0 seconds
==> Running `brew cleanup chatgpt-cli`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/guillermo/Library/Caches/Homebrew/chatgpt-cli--1.5.5... (9.1MB)
Removing: /Users/guillermo/Library/Caches/Homebrew/chatgpt-cli--1.5.5.tar.gz... (3.4MB)

 2024-05-26 19:32:03 ⌚ (☸️ |kind:N/A) Guillermos-MacBook-Pro in ~/workspace/homebrew-chatgpt-cli
± |main ✓| → chatgpt --version
ChatGPT CLI version v1.6.0 (commit bcbb4137f3cb115592cf1e8008744659c762066a)

@iocron note that my formula is called chatgpt-cli and not chatgpt. Could you share the output you are seeing on your end? Or do I need to install the chatgpt cask in order to get the naming conflict?

catskull commented 4 months ago

I have the ChatGPT cask and it also works fine.