termgpt

Crates.iotermgpt
lib.rstermgpt
version0.1.1
sourcesrc
created_at2023-05-08 10:28:28.222079
updated_at2023-05-08 14:25:22.390109
descriptionA cli tool to interact with ChatGPT
homepagehttps://github.com/bahdotsh/termgpt
repositoryhttps://github.com/bahdotsh/termgpt
max_upload_size
id859665
size55,802
Gokul (bahdotsh)

documentation

https://github.com/bahdotsh/termgpt

README



TermGPT


Interact with ChatGPT from your terminal! 🚀🤖

Install

Cargo

cargo install termgpt
termgpt --help

From source

git clone git@github.com:bahdotsh/termgpt.git
cd termgpt
cargo install --path .

Homebrew

brew tap bahdotsh/termgpt
brew install termgpt

Usage

For the first time you have to to enter your OpenAI API key.

termgpt --api <your api-key>

This key will then be saved to:

// Linux:   /home/alice/.config/termgpt
// Windows: C:\Users\Alice\AppData\Roaming\Foo Corp\termgpt
// macOS:   /Users/Alice/Library/Application Support/termgpt

To be reused later

Questions

For now you can ask ChatGPT anything related to managing your operating system or writing code. Eventually you'll be able to ask any question to ChatGPT (couple more prompts to go) with termgpt (P.S try to avoid using '?' at the end of your questions for now).

termgpt <any question>

Executing commands

You can ask to execute the generated command using --exec argument.

termgpt --exec list all the files in this folder 

Help message

termgpt --help


A cli tool to interact with ChatGPT

Usage: termgpt [OPTIONS] [CHAT]...

Arguments:
  [CHAT]...

Options:
      --api <API>  Your API key for OpenAPI
  -e, --exec       Execute the commands generated
  -h, --help       Print help
  -V, --version    Print version

Example questions

termgpt How do I list all files in the current directory
termgpt How can I find the number of lines in a file
termgpt How do I create a new directory
termgpt How can I check the available disk space
termgpt How do I delete a file
termgpt How can I search for a specific string in a file
termgpt How do I copy a file to a different location
termgpt How can I see the contents of a file
termgpt How do I move a file to a different location
termgpt How can I change the permissions of a file or directory

Inspirations

License

The MIT license

Commit count: 29

cargo fmt