Get GPT-like chatGPT on your terminal
You'll need to have your own OpenAi
apikey to operate this package.
- Go to https://platform.openai.com
- Select your profile menu and go to
View API Keys
- Select
+ Create new secret key
- Copy generated key
Install terminalGPT globally:
npm -g install terminalgpt
or
yarn global add terminalgpt
tgpt chat
PS: If it is your first time running it, it will ask for open AI key, paste generated key from pre-requisite steps.
tgpt chat --engine "gpt-4" --temperature 0.7
Note this library uses Chat Completions API.
The engine
parameter is the same as the model
parameter in the API. The default value is gpt-3.5-turbo
.
tgpt chat --markdown
It you are not satisfied or added a wrong api key, run
tgpt delete
npx terminalgpt
npx terminalgpt <command>
Note npx terminalgpt
doesn't install the terminalgpt package, instead it downloads the package to your computer and directly executes it from the cache.
You can find the package using
ls ~/.npm/_npx/*/node_modules
To delete the package, you can use
rm -r ~/.npm/_npx/*/node_modules/terminalgpt
Refer to CONTRIBUTING.md 😎