This is a TypeScript CLI tool for interacting with ChatGPT using the OpenAI API. It allows you to have interactive conversations with any model inside your shell.
Before using this tool, make sure you have the following:
- Node.js installed on your machine
- An OpenAI API key
-
Clone this repository:
git clone https://github.com/CompositeCoding/ChatGPTCLI.git
-
Install the dependencies:
npm install
To use this CLI tool, follow these steps:
-
Set your OpenAI API key as an environment variable named
OPENAI_API_KEY
. You can obtain an API key from the OpenAI website. You can specify the model by settingGPT_MODEL
, this will default to gpt-3.5-turbo. -
Run the CLI tool:
npm run start
-
The tool will prompt you to enter a message. To send your promt, type
send
on a new lineand hit enter. -
The ChatGPT model will generate a response based on your input.
-
You can continue the conversation by entering additional messages.
-
To exit the tool, type
q
or press Ctrl+C.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.
This tool is not officially developed or maintained by OpenAI. Use it at your own risk.
This tool is built using the OpenAI API. Special thanks to them!