
The RGPT tool allows you to interact with OpenAI's GPT API through the command-line interface.
Featuring a pre-configured prompt, it enables users to directly engage with the API from their terminal.
rgpt_demo.mp4
Table of Contents
Configure your shorthand commands in the settings.json file.
And then run the rgpt
command with the shorthand command and the text you want to send to the API.
- Rust Install Rust
- OpenAI Api Key Get OpenAI API Key
- Set the OpenAI Api Key in .env
OPENAI_API_KEY={YOUR_KEY_HERE}
- Configure the prompt and key shortcut in settings.json
mv .settings.example.com settings.json
- Build the rust cli application
cargo build --release
- Configure
rgpt
as a global command in the terminal (In ~/.bashrc or ~/.zshrc)# Add the line to enable `rgpt` command in the terminal alias rgpt="{YOUR_PATH_TO_RGPT_REPO}/rgpt/target/release/rgpt"
rgpt gc "This is a example of there is some grammar error in it"
# This will trigger the "gc" shorthand from the settings.json
# settings.json { "gc": { prompt: "Correct the following text for me:"}}
# The output will be:
"This is an example of there being some grammar error in it."
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See here for more information.