@ebenjs/gpt-shell
v1.1.1
Published
Chat-GPT in the console
Downloads
7
Readme
The app is a command line client for chat gpt. It allows users to ask gpt questions and receive responses directly in the console. Written in nodejs.
Table of Contents
Prerequisites
Any recent version of nodejs.
Installation
Common steps
git clone https://github.com/ebenjs/gpt-shell.git
cd gpt-shell
npm install
Linux and MacOS
cp .env.example .env
sudo chmod +x index.js
ln -s "$(pwd)/index.js" /usr/local/bin/gptshell
Windows
On windows, first you need to copy the .env.example
file to .env
.
copy .env.example .env
Then you need to create a gptshell.cmd
file in C:\Windows\System32
with the following content:
@echo off
node "C:\path\to\gpt-shell\index.js" %*
Usage
gptshell ask -p "What is the meaning of life?"
Configuration
gptshell config -k YOUR_API_KEY -m MODEL_NAME -u API_URL
-k
or --key
is your openai api key.-m
or --model
is the model name to use. Default is gpt-3.5-turbo
.-u
or --url
is the url of the gpt server. Default is https://api.openai.com/v1/chat/completions
.
The configuration command is needed only once. It will create a .gpt-shell-config.json
file in current directory. You can edit this file manually if you want to change the configuration.
Contributing
Contributions are welcome. Please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
For more information, please refer to the contributing guidelines.