howtoshell

Crates.iohowtoshell
lib.rshowtoshell
version1.0.1
sourcesrc
created_at2023-03-29 00:57:27.963265
updated_at2023-03-29 00:57:27.963265
descriptionGet directions for how to do anything in the terminal. Powered by ChatGPT. Like TLDR, but smarter.
homepage
repositoryhttps://github.com/richbai90/howto
max_upload_size
id823582
size41,090
Rich B (richbai90)

documentation

README

Welcome to HowTo 👋

Version License: MIT

Get directions for how to do anything in the terminal. Powered by ChatGPT. Like TLDR, but smarter.

Install

cargo install howto

Usage

howto query "unpack a tar.gz file"

Advanced Usage

The howto command has two subcommands, query and auth. The auth subcommand has two additional subcommands, login and logout.

Log in to the ChatGPT API

The login subcommand is used to log in to the ChatGPT API and only needs to be run once.

$ howto auth login

Log out of the ChatGPT API

The logout subcommand is used to log out of the ChatGPT API and clear the API key from the local machine.

$ howto auth logout

Query the ChatGPT API

The query subcommand is used to get directions on how to do something in the terminal. The query takes a single argument, which can be a word or a phrase.

$ howto query "unpack a tar.gz file"

Internally, the query is prefixed with the phrase Provide a command to do the following in a terminal: to limit the context of the query to commands in the terminal.

The response from the ChatGPT API will be printed to the terminal.

Alias

After installing the howto command, you can add an alias to your shell's configuration file to make it easier to use. For example, if you use bash, you can add the following to your ~/.bashrc file:

alias howto="howto query"

Just make sure that you have logged in to the ChatGPT API before adding the alias.


Author

👤 Rich Baird

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator

Commit count: 13

cargo fmt