Skip to content

Terminal application suggests the required Linux command on user request using ChatGPT API.

Notifications You must be signed in to change notification settings

torys877/hintme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 {} +

About

Terminal application suggests the required Linux command on user request using ChatGPT API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages