Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 1.14 KB

README.md

File metadata and controls

68 lines (43 loc) · 1.14 KB

ChatGPT Cli Assistant

This is a simple console application that suggests the required Linux command on user request using ChatGPT.

Prerequisites

It was build and tested with:

  • Rust 1.80.0
  • Ubuntu 22.04

Create OpenAI Project And Obtain Api Key for authentification

https://platform.openai.com/docs/quickstart

Clone

git clone [email protected]:torys877/hintme.git
cd hintme

Build

Set Data In .env File

cp example.env .env

Set your API key into OPENAI_API_KEY variable in .env file

Build Executable File

cargo build --release

Installation

Copy Executable File And Create Symlink

sudo cp ./target/release/hintme /usr/bin
sudo ln -s /usr/bin/hintme /usr/local/bin

Set Environment Variables For Api

export OPENAI_API_KEY="YOUR_API_KEY"
export OPENAI_API_URl="https://api.openai.com/v1/chat/completions"```

Usage

Run Command With Question

hintme how to find all files with extension "torrent", output their paths and delete them?

Expected Response

find /path/to/directory -type f -name "*.torrent" -exec rm {} +