https://github.com/MakisChristou/rustgpt
Yet another command-line chat GPT frontend written in Rust.
https://github.com/MakisChristou/rustgpt
chat chatbot chatgpt chatgpt-cli gpt-3 gpt-4 gpt3-turbo openai rust
Last synced: over 1 year ago
JSON representation
Yet another command-line chat GPT frontend written in Rust.
- Host: GitHub
- URL: https://github.com/MakisChristou/rustgpt
- Owner: MakisChristou
- License: gpl-3.0
- Created: 2023-04-13T20:15:31.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-04T20:47:16.000Z (almost 3 years ago)
- Last Synced: 2025-03-06T02:52:30.864Z (over 1 year ago)
- Topics: chat, chatbot, chatgpt, chatgpt-cli, gpt-3, gpt-4, gpt3-turbo, openai, rust
- Language: Rust
- Homepage:
- Size: 57.6 KB
- Stars: 32
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cli-apps - gpterm - Yet another command-line ChatGPT frontend written in Rust. (<a name="ai"></a>AI / ChatGPT)
README
# rustgpt
Yet another command-line chat GPT frontend written in Rust.

## Install
```bash
cargo install rustgpt
```
## Features
* Stream output with typing effect
* Store chat messages/history
* Context aware conversation
* Simple and minimal
* Multiline mode (use `{}` to enter multiline mode)
## Prompt Shortcuts
* Search History `CTRL + R`
* Clear Prompt `CTRL + L`
* Exit `CTRL + C` twice
## Future Features
* ~~Multiline input~~
* Syntax highlighting
* Choose model/role
* Add Jailbreaks
## Build
1. Clone the repository to your local machine.
2. Navigate to the directory where the repository was cloned.
3. Run the following command to build the application:
```bash
$ cargo build --release
```
Quickly run
```bash
$ cargo run
```
## Getting Started
To get the most basic of setups up and running you need to create a `.env` file and populate it with your api key
```bash
touch .env
```
Edit your `.env` file by adding your api key.
```bash
API_KEY=sk-...
```
To exit the program simply Ctrl + C twice.
## Configuration Options
- `API_KEY`: Set this to your chat gpt api key
- `CONTEXT`: (Optional) Set this to `true` if you want to keep context in your conversation. Default `false`.
- `HISTORY`: (Optional) Set this to `true` if you want to store your chat history. Default `false`.
- `MODEL`: (Optional) Set this to any of the models supported by OpenAI (`gpt-4`, `gpt-4-0314`, `gpt-4-32k`, `gpt-4-32k-0314`, `gpt-3.5-turbo`, `gpt-3.5-turbo-0301`) Default `gpt-3.5-turbo`
- `TYPING_DELAY`: (Optional) Set the delay between each letter in milliseconds (Default `10`)