|
| 1 | +<p align="center"> |
| 2 | + <img width="200" alt="TerminalGPT logo" src="https://user-images.githubusercontent.com/11979969/211214696-7519a871-4981-44a8-8c2d-a1d187839126.png"/> |
| 3 | +</p> |
| 4 | + |
| 5 | +<p align="center"> |
| 6 | + <img width="80" alt="TerminalGPT logo" src="https://img.shields.io/github/actions/workflow/status/jucasoliveira/terminalGPT/pr.yml"/> |
| 7 | + <img width="100" alt="TerminalGPT logo" src="https://img.shields.io/npm/dt/terminalgpt"/> |
| 8 | + <img width="100" alt="TerminalGPT logo" src="https://img.shields.io/github/contributors/jucasoliveira/terminalGPT"/> |
| 9 | + <img width="100" alt="TerminalGPT logo" src="https://img.shields.io/github/package-json/v/jucasoliveira/terminalGPT"/> |
| 10 | + |
| 11 | +</p> |
| 12 | + |
| 13 | +<p align="center"> |
| 14 | +Get GPT-like chatGPT on your terminal |
| 15 | +</p> |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +<p align="center"> |
| 20 | +<a href="https://www.producthunt.com/posts/terminalgpt?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-terminalgpt" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=373888&theme=light" alt="terminalGPT - Use OpenAi like chatGPT, on your terminal | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a> |
| 21 | + |
| 22 | +</p> |
| 23 | + |
| 24 | +## Prerequisites |
| 25 | + |
| 26 | +You'll need to have your own `OpenAi` apikey to operate this package. |
| 27 | + |
| 28 | +1. Go to <https://platform.openai.com> |
| 29 | +2. Select your profile menu and go to `View API Keys` |
| 30 | +3. Select `+ Create new secret key` |
| 31 | +4. Copy generated key |
| 32 | + |
| 33 | +# Installation |
| 34 | + |
| 35 | +Install terminalGPT globally: |
| 36 | + |
| 37 | +```bash |
| 38 | +npm -g install terminalgpt |
| 39 | +``` |
| 40 | + |
| 41 | +or |
| 42 | + |
| 43 | +```bash |
| 44 | +yarn global add terminalgpt |
| 45 | +``` |
| 46 | + |
| 47 | +## Start chat |
| 48 | + |
| 49 | +```bash |
| 50 | +tgpt chat |
| 51 | +``` |
| 52 | + |
| 53 | +PS: If it is your first time running it, it will ask for open AI key, **paste generated key from pre-requisite steps**. |
| 54 | + |
| 55 | +## Options |
| 56 | + |
| 57 | +### Change engine and temperature |
| 58 | + |
| 59 | +```bash |
| 60 | +tgpt chat --engine "gpt-4" --temperature 0.7 |
| 61 | +``` |
| 62 | + |
| 63 | +Note this library uses [Chat Completions API](https://platform.openai.com/docs/api-reference/chat). |
| 64 | +The `engine` parameter is the same as the `model` parameter in the API. The default value is `gpt-3.5-turbo`. |
| 65 | + |
| 66 | +### Use markdown |
| 67 | + |
| 68 | +```bash |
| 69 | +tgpt chat --markdown |
| 70 | +``` |
| 71 | + |
| 72 | +## Change or delete api key |
| 73 | + |
| 74 | +It you are not satisfied or added a wrong api key, run |
| 75 | + |
| 76 | +```bash |
| 77 | +tgpt delete |
| 78 | +``` |
| 79 | + |
| 80 | +## Using with npx |
| 81 | + |
| 82 | +```bash |
| 83 | +npx terminalgpt |
| 84 | +``` |
| 85 | + |
| 86 | +```bash |
| 87 | +npx terminalgpt <command> |
| 88 | +``` |
| 89 | + |
| 90 | +Note `npx terminalgpt` doesn't install the terminalgpt package, instead it downloads the package to your computer and directly executes it from the cache. |
| 91 | + |
| 92 | +You can find the package using |
| 93 | + |
| 94 | +`ls ~/.npm/_npx/*/node_modules` |
| 95 | + |
| 96 | +To delete the package, you can use |
| 97 | + |
| 98 | +`rm -r ~/.npm/_npx/*/node_modules/terminalgpt` |
| 99 | + |
| 100 | +## Contributing |
| 101 | + |
| 102 | +Refer to CONTRIBUTING.md 😎 |
| 103 | + |
| 104 | +## ✨ Contributors |
| 105 | + |
| 106 | +<a href="https://github.com/jucasoliveira/terminalGPT/graphs/contributors"> |
| 107 | + <img src="https://contrib.rocks/image?repo=jucasoliveira/terminalGPT" /> |
| 108 | +</a> |
0 commit comments