1 stable release
1.0.1 | Mar 29, 2023 |
---|
#11 in #ai-powered
13KB
155 lines
Welcome to HowTo 👋
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
- Github: @richbai90
- LinkedIn: @richbai90
Show your support
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator
Dependencies
~5–18MB
~236K SLoC