Disclaimer: This is currently only for Linux and isn't built for Windows or Mac.
How is an AI-powered tool to create tailored commands all within the comforts of your shell!
You can download the binary from the latest release.
Or you can build from source (requires Deno):
git clone https://github.com/vandesm14/how.git
cd how
chmod +x build.sh
./build.sh
You will need to get an API key from OpenAI. Once you have that, you can either:
Use the environment variable
HOW_OPENAI_KEY=<your key> how to <your prompt>
Use the config editor
how config key <your key>
# how to <your prompt>
$ how to create a new file
# Do you want to run the following command(s)?
# touch file.txt [y/N] y
# $ touch shane.txt
Pull requests are welcome. For major changes, please open an issue to discuss what you would like to change.
When you first run how (such as how to get the time
), our magical wizard will ask you a few questions. This will include whether you would like to send extra contextual data in the prompt to OpenAI such as your username and OS distro.
You can change this at any time by running how config anonymous <true | false>
. This will update the config file located at ~/.config/how/config.json
.
All data related to how is stored in the ~/.config/how
directory. This includes the config file and history.
Configuring the data sent to OpenAI is not editable via config. Instead, it requires a rebuild of the binary. To do this, you will need to:
- Clone the repository
- Edit the
lib/prompt.ts
file to your liking - Build the project (see Installation)