Home

Awesome

<div align="center"> <img src="media/shrs_openai_banner.png" alt="shrs_openai">

crates.io docs.rs MIT/Apache 2.0

</div>

This is a plugin for shrs. It enables the ability to use ChatGPT to help you out on common command like tasks like:

Using this plugin

First add this plugin to your dependencies

shrs_openai = { version = "0.0.2" }

Then include this plugin when initializing shrs

use shrs::prelude::*;
use shrs_openai::OpenaiPlugin;

let api_key = std::env::var("OPENAI_KEY").unwrap().to_string();

let myshell = ShellBuilder::default()
    .with_plugin(OpenaiPlugin::new(api_key))
    .build()
    .unwrap();