|
| 1 | +<!-- Badges section here. --> |
| 2 | + |
| 3 | +[](https://badge.fury.io/js/@ebenjs%2Fgpt-shell) |
| 4 | +[](https://travis-ci.org/brunolm/chat-gpt) |
| 5 | +[](https://snyk.io/test/github/brunolm/chat-gpt?targetFile=package.json) |
| 6 | +[](https://opensource.org/licenses/MIT) |
| 7 | + |
| 8 | +<!-- Description section here. --> |
| 9 | + |
| 10 | +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. |
| 11 | + |
| 12 | +<!-- Table of contents section here. --> |
| 13 | + |
| 14 | +## Table of Contents |
| 15 | + |
| 16 | +- [Table of Contents](#table-of-contents) |
| 17 | +- [Prerequisites](#prerequisites) |
| 18 | +- [Installation](#installation) |
| 19 | + - [Common steps](#common-steps) |
| 20 | + - [Linux and MacOS](#linux-and-macos) |
| 21 | + - [Windows](#windows) |
| 22 | +- [Usage](#usage) |
| 23 | +- [Configuration](#configuration) |
| 24 | +- [Contributing](#contributing) |
| 25 | + |
| 26 | +## Prerequisites |
| 27 | + |
| 28 | +Any recent version of nodejs. |
| 29 | + |
| 30 | +<!-- Installation section here. --> |
| 31 | + |
| 32 | +## Installation |
| 33 | + |
| 34 | +### Common steps |
| 35 | + |
| 36 | +```bash |
| 37 | +git clone https://github.com/ebenjs/gpt-shell.git |
| 38 | +cd gpt-shell |
| 39 | +npm install |
| 40 | +``` |
| 41 | + |
| 42 | +### Linux and MacOS |
| 43 | + |
| 44 | +```bash |
| 45 | +sudo chmod +x index.js |
| 46 | +ln -s "$(pwd)/index.js" ~/bin/gptshell |
| 47 | +``` |
| 48 | + |
| 49 | +### Windows |
| 50 | + |
| 51 | +On windows you need to create a `gptshell.cmd` file in `C:\Windows\System32` with the following content: |
| 52 | + |
| 53 | +```cmd |
| 54 | +@echo off |
| 55 | +node "C:\path\to\gpt-shell\index.js" %* |
| 56 | +``` |
| 57 | + |
| 58 | +<!-- Usage section here. --> |
| 59 | + |
| 60 | +## Usage |
| 61 | + |
| 62 | +```bash |
| 63 | +gptshell ask -p "What is the meaning of life?" |
| 64 | +``` |
| 65 | + |
| 66 | +## Configuration |
| 67 | + |
| 68 | +```bash |
| 69 | +gptshell config -k YOUR_API_KEY -m MODEL_NAME -u API_URL |
| 70 | +``` |
| 71 | + |
| 72 | +`-k` or `--key` is your openai api key. |
| 73 | +`-m` or `--model` is the model name to use. Default is `gpt-3.5-turbo`. |
| 74 | +`-u` or `--url` is the url of the gpt server. Default is `https://api.openai.com/v1/chat/completions`. |
| 75 | + |
| 76 | +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. |
| 77 | + |
| 78 | +<!-- Contributing section here. --> |
| 79 | + |
| 80 | +## Contributing |
| 81 | + |
| 82 | +Contributions are welcome. Please open an issue first to discuss what you would like to change. |
| 83 | + |
| 84 | +Please make sure to update tests as appropriate. |
| 85 | + |
| 86 | +For more information, please refer to the [contributing guidelines](./CONTRIBUTING.md). |
0 commit comments