Skip to content

Basic program in Javascript (Node.js) that allows the usage of OpenAI's API through the terminal

Notifications You must be signed in to change notification settings

cristinel24/GPT-Terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPT-Terminal

Basic program in Javascript (Node.js) that allows the usage of OpenAI's API through the terminal.

Install

Ensure you have Node.js version 16.x + installed. Then run the following:

npm i -g gpt-terminal

Or

npm install --global gpt-terminal

Once you installed the npm package, you need to setup your API key:

Create an environment file .ENV (where you downloaded this module) that contains your API Key .
<YOUR_API_KEY> will be replaced with your ChatGPT API Key.

Usage

Just write this extremely difficult command in your terminal:

gpt

Once you're done with that, a new pop-ul will appear on screen:

Just type your question for ChatGPT.
If you want to give a file as an input just type read <your_file_name> like this:

PS: Quotes " " are optional. Ctrl+C to stop the application.

Important!

Be aware that any newline '\n' sent as input directly from the terminal will be recognized as an Enter resulting in sending the query to ChatGPT. If you want to use text blocks as input, I recommend putting them in a file and doing the step above.

About

Basic program in Javascript (Node.js) that allows the usage of OpenAI's API through the terminal

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published