cli-ai v0.2.2
✨ Introduction
Cli-AI is a simple and easy to use tool that allows you to interact with OpenAI's GPT3 from your terminal.
Installation
NPM
npm install -g cli-aiYarn
yarn global add cli-aiSetup
Linux/MacOS
To use cli-ai you need to have an OpenAI API key. You can get one here. This is how you can set it up in zsh, bash shells
zsh
To Setup the keu replace YOUR_KEY_GOES_HERE with your OpenAI API key which you can get from here and run this command in your terminal
echo "export OPENAI_API_KEY='YOUR_KEY_GOES_HERE'" >> ~/.zshrcUpdate the state of your shell with the newly added variable:
source ~/.zshrcVerify that the environment variable has been set correctly:
echo $OPENAI_API_KEYBash
Same as zsh but replace ~/.zshrc with ~/.bashrc
# Set your API key
echo "export OPENAI_API_KEY='YOUR_KEY_GOES_HERE'" >> ~/.bashrc
# Update the state of your shell with the newly added variable
source ~/.bashrc
# Confirm that you have set your environment variable
echo $OPENAI_API_KEYUsage
CLI-AI Commands are very simple and easy to use. Here's a list of the available commands
Get a list of all available commands
cli-ai --helpAsk your question to GPT3
cli-ai -ask "What is the meaning of life?"Increase character limit
cli-ai -ask "What is the meaning of life?" --max-tokens 300
cli-ai -ask "What is the meaning of life?" -mt 300Tokens are pieces of words. 1,000 tokens are about 750 words. OpenAI
Enable Voice Assistant
cli-ai -ask "What is the meaning of life?" -mt 300 --voice-assistant "active"
cli-ai -ask "What is the meaning of life?" -mt 300 -vt "active"License
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details
Github @humamaboalraja · Twitter @humamaboalraja