diff options
author | schark <jordan@schark.online> | 2023-12-04 22:08:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 22:08:51 -0800 |
commit | 51f1fd0611cd6af81a80138828cbd4b8ecfeb981 (patch) | |
tree | e1c416da736b7d31b20496d65e94540bda4b155f /README.md | |
parent | 9c48ec6fe2da99618023ce834499d2fe5bd84936 (diff) | |
download | cli-gpt-51f1fd0611cd6af81a80138828cbd4b8ecfeb981.tar.gz cli-gpt-51f1fd0611cd6af81a80138828cbd4b8ecfeb981.zip |
Update readme
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 52 |
1 files changed, 50 insertions, 2 deletions
@@ -1,3 +1,51 @@ -# CLI GPT + + ██████╗██╗ ██╗ ██████╗ ██████╗ ████████╗ + ██╔════╝██║ ██║ ██╔════╝ ██╔══██╗╚══██╔══╝ + ██║ ██║ ██║█████╗██║ ███╗██████╔╝ ██║ + ██║ ██║ ██║╚════╝██║ ██║██╔═══╝ ██║ + ╚██████╗███████╗██║ ╚██████╔╝██║ ██║ + ╚═════╝╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ + -A basic CLI program to replicate ChatGPT capabilities in the terminal for those with an OpenAI API key. An easy way to pay for the amount you use GPT-4 as opposed to the monthly flat rate for Plus members. +cli-gpt is a ChatGPT-like terminal wrapper to make interfacing with GPT models with an OpenAI API key easier. + +## Requirements and Installation + +I've tried to keep requirements low as to keep the program pretty minimal. Outside of native Python libraries, we're grabbing `openai` (obviously) to interface with the OpenAI API, `tiktoken` to get token information, and `prompt_toolkit` + `pygments` for better terminal handling. + +To install and run the program, simply execute the following commands. +``` +# Clone repository +git clone https://github.com/jordanscharkey/cli-gpt.git +cd cli-gpt/ + +# Create environment +python -m venv .venv/ +. .venv/bin/activate +pip install -r requirements.txt + +# Fill token file and run +vim token +python chat.py +``` + +### Token File + +To use this program, you will need an OpenAI API key. Keep this token in a file named `key` in the repository and the program should automatically read from it. + +## Additional Functionality + +The `/help` command will list all commands and a short description of what that command will accomplish. Here is a summary of those commands: + +``` + - /exit: Closes the chat. + - /context: Passthrough a URL to curl the context of into the chat history. + - /help: Display this list of available commands. + - /load: Load in a previous chat's JSON file. + - /save: Saves messages to specified JSON file and closes chat. + - /clear: Clears all messages and tokens from the chatlog, restarting the chat. + - /model: Change the model being used. + - /info: Print model information and cli-gpt version. + - /write: Write out any code from the previous message to a specified file. + - /copy: Copy code snippets from the previous message into the copy buffer. +``` |