Supercharge your CLI with the power of OpenAI's GPT model (and other models too!)

  • By Junyu Wang
  • Last update: Jul 26, 2023
  • Comments: 2

gptc - GPT ❤️ CLI

Supercharge your CLI with the power of OpenAI's GPT model (and other models too!), generate script without leaving the terminal, one-click command explanation, and interactive chat with GPT all in one place.

A large part of this tool is actually written by GPT-4 🧠

Install

You can install this tool by downloading the release archive directly from GitHub or use homebrew

brew tap junyu-w/gptc [email protected]:junyu-w/homebrew-gptc.git
brew install gptc

To upgrade to the latest version (make sure you had run the brew tap command above already), run

brew upgrade

How to use?

It's as simple as typing gptc in your terminal, and we'll walk you through the rest from configuration to your first request 🙌

Additionally, if you would like to just start an interactive chat with GPT about anything beyond just bash script or command, simply type

gptc chat

and you'll have the ChatGPT experience right in the terminal!

Example - Generate and explain script

gptc-recording.mov

Example - Interactive chat with GPT

gptc-chat-with-ai.mov

Download

gptc.zip

Comments(2)

  • 1

    How to use GPT-4 in this program?

    what values are available for "model" variable in the config?

    I tried to set gpt4, gpt-4, GPT4, but when I start chatting and ask "who are you" it says it's gpt-3 and it's the newest version of gpt.

    also, do I need to buy ChatGPT Plus to use GPT4? If yes, then what happens if one doesn't have Plus and tries to use GPT4?

    Maybe I can't use GPT4 because I don't have Plus and it fallbacks to GPT-3?

  • 2

    Feature Request: "regular" chat mode

    I'm loving gptc so far!

    Any possibility of adding an option to do a "regular" chat mode to be able to chat about non-bash or shell related things?

    An option to go straight into a normal chat would be really cool. Basically just ChatGPT on the CLI. Something like:

    gptc -c

    This is an amazing idea, by the way. 10/10!