Are you continue to getting access to ChatGPT during the web page, or by means of third birthday party gear? How about making an attempt one thing other? You already know, you don’t at all times must open your browser and navigate to the ChatGPT web page. You’ll be able to in fact use ChatGPT immediately out of your Mac’s Terminal as smartly.

Surroundings it up is beautiful easy. On this educational, I’m going to lead you thru simply that. So, let’s leap proper in and get began.

Observe: This works for Linux and Home windows too.

chatgpt with mac terminalchatgpt with mac terminal

Step 1. Get an OpenAI API key

First, we want to get a brand new OpenAI API key. Join an OpenAI account in the event you don’t have one, else simply log in on your account.

Search for the ‘USER’ phase, then click on on ‘API keys‘.

openai api keyopenai api key

Subsequent, create a brand new secret key by way of clicking ‘+ Create new secret key‘.

create new secret keycreate new secret key

Make a copy of this API key as we’ll want it later.

Step 2. Set up Homebrew

Subsequent, we will be able to want to set up Homebrew. Homebrew assist makes putting in different stuff we want in later degree simple.

To put in Homebrew, head over to the Homebrew’s web page. There, you’ll discover a line of code beneath the phase ‘Set up Homebrew‘.

homebrew websitehomebrew website

Or, you’ll additionally use the next code. Replica it, then pass on your Terminal, paste it in, and hit Input.

/bin/bash -c "$(curl -fsSL up/HEAD/set"

Observe: Be mindful, putting in Homebrew might take a bit of of time.

After the whole lot is completed, kind the next command within the Terminal and hit Input.

brew --version
homebrew installedhomebrew installed

This may occasionally display the edition of Homebrew you’ve put in, confirming that the set up is entire.

Step 3. Set up AIChat

After acquiring your API key and effectively putting in Homebrew, our subsequent step is to put in AIChat.

At the identical Terminal window, enter the next command and hit Input.

brew set up airchat
install aichatinstall aichat

This may occasionally start the set up of AIChat for your Mac. The set up procedure will have to be beautiful fast.

Step 4. Configure AIChat

With AIChat now put in, your next step is to configure it. Since we’re assuming that is your first time atmosphere it up, you’ll want to give you the following, in collection, for the configuration.

  • Input “y” to create a brand new config document
  • Paste on your API key.
  • Input “y” in the event you don’t need to use Proxy. (You in most cases gained’t want it.)
  • Input “y” if you wish to save all chat messages, else, simply hit “n”.

An editable edition of the config document will likely be created and it may be discovered on the following location shall you wish to have to make any adjustments later:

/Customers//Library/Utility Make stronger/aichat/config.yaml

And that’s all there’s to it. You’ll be able to now get started the usage of ChatGPT proper out of your Mac’s terminal.

Step 5. The usage of AIChat

To begin the usage of AIChat, merely kind within the following in Terminal and hit Input.


That’s it! You’ll be able to now kind on your activates and hit Input. Look ahead to the responses simply as you possibly can when the usage of ChatGPT on-line.

using aichatusing aichat

Bonus: Additional Configuring AIChat

Previous, I discussed {that a} reproduction of your configuration is stored at this location: /Customers//Library/Utility Make stronger/aichat/config.yaml.

While you open that document, you’ll see your API key. On the other hand, you’ll upload extra configurations to this document. As an example, you’ll specify a specific ChatGPT style for use.

Let’s check out an instance of the more than a few settings you’ll outline on your configuration document.

api_key: ""  # Request by means of
organization_id: "org-xxx"        # non-compulsory, set group identification
style: "gpt-3.5-turbo"            # non-compulsory, make a choice a style
temperature: 1.0                  # non-compulsory, see doctors/api-reference/chat/create#chat/create-temperature
save: true                        # non-compulsory, If set true, aichat will save chat messages to
spotlight: true                   # non-compulsory, Set false to show spotlight
proxy: "socks5://"  # non-compulsory, set proxy server. e.g. or socks5://
conversation_first: false         # non-compulsory, If set true, get started a dialog right away upon repl
light_theme: false                # non-compulsory, If set true, use mild theme
connect_timeout: 10               # non-compulsory, Set a timeout in seconds for hook up with gpt.


To assist fortify your revel in the usage of AIChat for your Mac’s terminal, right here’s some more information chances are you’ll in finding helpful.

1. get started AIChat?

To begin AIChat, kind within the following in Termimal and hit Input.

2. hand over AIChat?

To hand over AIChat, kind within the stick with in Terminal and hit Input

.go out
forestall AIChat from producing reaction?

If you wish to have to right away forestall the reaction that ChatGPT is offering, use the next shortcut key:

Keep an eye on + C

3. One-off request, vs. Dialog conscious.

Identical to common ChatGPT, AIChat isn’t ready to deal with follow-up questions. So, in the event you ask it, ‘how time and again has Germany gained the International Cup?‘, it’s going to provide you with a solution.

On the other hand, in the event you follow-up asking, ‘what used to be their rating in 1954?‘, it gained’t be capable of supply a related reaction.

If you wish to ask questions which can be a part of a dialog, or follow-up questions, simply input the next command and hit Input.


Then kind on your questions, one after the other.

aichat conversationaichat conversation
4. hand over dialog mode?

To hand over dialog mode, use this command:

.transparent dialog
5. trade ChatGPT style?

You’ll be able to trade it proper within the Terminal itself. When you have get entry to to GPT-4, merely kind within the following command and hit Input.

.style gpt-4.
change chatgpt modelchange chatgpt model

Then again, you’ll seek advice from the “Additional Configuring AIChat” phase above, the place you’ll edit the ChatGPT style edition within the config document.


Aichat’ has extra functions than chances are you’ll to begin with see. You’ll be able to kind .data or .assist to find extra options. Additionally, you’ll talk over with the AIChat’s GitHub web page for extra detailed data.

The put up Setup and Use ChatGPT in Mac Terminal gave the impression first on Hongkiat.

WordPress Website Development Source:

[ continue ]