Skip to content

The simplest and cutest hahah program for querying ChatGPT from Linux Terminal

License

Notifications You must be signed in to change notification settings

Lucho-A/ChatGP-Terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGP-Terminal

The simplest and cutest hahah C-program for querying ChatGPT from Linux terminal. All chat endpoint models are supported (since v1.2.1). In the particular case of 'gpt-4-vision-preview' uploading images isn't implemented.

  • Downloads: here
    • Binary (amd64) and man page:
    • wget https://github.com/Lucho-A/ChatGP-Terminal/blob/master/ChatGP-Terminal/Releases/chatgp-terminal_1.2_2.tar.gz
      
    • Debian based distros:
    • wget https://github.com/Lucho-A/ChatGP-Terminal/blob/master/ChatGP-Terminal/Releases/chatgp-terminal_1.2_2.deb
      sudo apt-get install ./chatgp-terminal_1.2_2.deb
      
    • Compilation (prior installing dependencies):
    • git clone https://github.com/lucho-a/ChatGP-Terminal.git
      cd ChatGP-Terminal/ChatGP-Terminal/Src
      gcc -o chatgp-terminal ChatGP-Terminal.c libGPT/* -lssl -lespeak -lpthread -lreadline
      
  • Documentation only (man): here
  • CHANGELOG/TODO: here

Have Fun!

Dependencies:

  • libssl.so.3
  • libreadline.so.8
  • libc.so.6
  • libespeak-ng.so.1

Installation (Debian way):

sudo apt-get install libssl3-dev libreadline-dev libc6-dev libespeak-ng-dev

Usage:

chatgp-terminal --help

Examples:

I'm using this way right now, and works pretty smoothly:

chatgp-terminal --apikeyfile ~/.cgpt/.cgpt.key --check-status --alert-finished-status --max-context-messages 5 --max-tokens 2048 --role-file ~/.cgpt/cgpt.role --session-file ~/.cgpt/.cgpt.session --save-messages-to ~/.cgpt/cgpt.msg --log-file ~/.cgpt/cgpt.log

Into the man page you can find others.

Screenshots:

imagen

imagen