cli-ai

0.2.2 • Public • Published
grind.xyz

Cli-AI

A command line interface client for interacting with OpenAI's GPT3

CLI-AI Build status latest release by date license Total downloads NPM monthly install
grind.xyz


✨ 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-ai
Yarn
yarn global add cli-ai

Setup

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'" >> ~/.zshrc

Update the state of your shell with the newly added variable:

source ~/.zshrc

Verify that the environment variable has been set correctly:

echo $OPENAI_API_KEY

Bash 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_KEY

Usage

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 --help
Ask 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 300

Tokens 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

Readme

Keywords

Package Sidebar

Install

npm i cli-ai

Weekly Downloads

2

Version

0.2.2

License

BSD-3-Clause

Unpacked Size

366 kB

Total Files

46

Last publish

Collaborators

  • humamaboalraja