Skip to main content

termGPT: Interacting with openAI's chatGPT on your terminal

Let's build a minimal app to interact with chatGPT without leaving the terminal
Created on March 3|Last edited on March 16
Now you can use chatGPT as an API. This enables all kinds of cool usages like creating your custom client. Also, it is priced reasonably aggressively, so building your client from scratch can be interesting financially!
As I like using the terminal, I took the python API for a spin and built a fairly minimal client that lets me call chatGPT whenever I want. Is as simple as typing gpt on my terminal and I am interacting with the AI.


Another useful feature for me was the ability to ask questions about a file, you can do this by passing a file name after calling gpt.

You can also ask about himself 🤣


Try it out!

Go ahead and install it on your terminal:
$ pip install termgpt
The program expects you OpenAI's API key on the environment variable: OPENAI_API_KEY
The code is very minimal and can be found here: