chatgpt4-cli


Namechatgpt4-cli JSON
Version 1.5.9 PyPI version JSON
download
home_pagehttps://github.com/Simatwa/gpt-cli
SummaryInteract with ChatGPT and Bard at the terminal.
upload_time2024-01-16 22:33:11
maintainerSmartwa Caleb
docs_urlNone
authorSmartwa Caleb
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements numpy colorama openai revChatGPT appdirs requests tabulate GoogleBard fpdf
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">gpt-cli</h1>
<p align="center">
<a href="https://github.com/Simatwa/gpt-cli"><img src="https://img.shields.io/static/v1?logo=Github&label=Github&message=Passing&color=lime" alt="Gihtub"/></a>
<a href="https://pypi.org/project/chatgpt4-cli/"><img src="https://img.shields.io/static/v1?label=Pypi&message=v1.5.9&color=green&logo=pypi" alt="Pypi"/>
<a href="https://wakatime.com/badge/github/Simatwa/gpt-cli"><img src="https://wakatime.com/badge/github/Simatwa/gpt-cli.svg" alt="wakatime"/></a>
<a href="#"><img src="https://img.shields.io/static/v1?label=License&message=MIT&color=green&logo=MIT" alt="license"/></a>
<a href="#"><img src="https://img.shields.io/static/v1?label=Development&message=Beta&color=Orange&logo=progress" alt="Progress"/></a>
<a href="#"><img src="https://img.shields.io/static/v1?label=Code Style&message=Black&color=black&logo=Black" alt="Code-style"/></a>
<a href="#"><img src="https://img.shields.io/static/v1?label=Coverage&message=80%&color=green" alt="Coverage"/></a>
<a href="https://pepy.tech/project/chatgpt4-cli"><img src="https://static.pepy.tech/badge/chatgpt4-cli" alt="Downloads"/></a>
</p>

CLI tool for interacting with [ChatGPT](https://openai.com) and [Bard](https://bard.google.com).
> Generate images with BingImageCreator and ChatGPT's DALL-E models.

![screenshot](https://github.com/Simatwa/gpt-cli/raw/main/assets/Screenshot1.png)

### Features

- Chat with ChatGPT and Bard conversationally.
- Let **ChatGPT** and **Bard** chat to each other.
- Generate Images (DALL-E & BingImageCreator)- Based on your prompt or GPT generated description.
- Stream or Non-stream responses.
- Maintain record of the chats.
- Parse [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts) easily.
- Fully customizable Commandline Interface.
- Interact with system commands on the fly.

### Prerequisites

- [x] [OPENAI_API_KEY](https://platform.openai.com/account/api-keys)

- [x] [Bard Cookies](https://bard.google.com)

- [x] [Bing cookies](https://bing.com) - *optional*

## Installation

Either of the following ways will get you ready.

1. Using pip

- From pypi

```sh
sudo pip install chatgpt4-cli
```

- Installing from source

```sh
 sudo pip install git+https://github.com/Simatwa/gpt-cli.git
 ```

2. Cloning locally and install

```sh
git clone https://github.com/Simatwa/gpt-cli.git
cd gpt-cli
pip install .
 #or
sudo pip install .
```

## Usage 

- Make OPENAI_API_KEY an environment variable.

`$ export OPENAI_API_KEY=<openai-api-key>`

After that you can launch the script with or without a prompt

> For instance :
```sh 
    #Without a prompt
   $ gpt-cli 
    # With a prompt 
   $ gpt-cli Write a conversation between Sun and Pluto.`
```

- Parsing OPENAI_API_KEY as one of the arguments

Run `$ gpt-cli -k <openai-api-key> <Your query>` at the terminal.

> For instance :

```sh
$ gpt-cli -k xxxxxxxxxxxxxxxxxx How to scan for SMB vulnerability using NMAP?
```

The [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts) can be parsed to the script through the following ways:

- Specifying the role - (*case-sensitive*)

    e.g `$ gpt-cli UX/UI Developer`

- Specifying the index of the prompt:

    e.g `$ gpt-cli 29`

Run `$ gpt-cli --dump show` to view the act,prompt and their **indexes**

You can as well generate images using EdgeGPT (DALL-E) or ChatGPT independent of `gpt-cli`, uninteractively at the terminal:

1. EdgeGPT 

```sh
$ gpt-cli-emage --cookie-file <path> <Your prompt>
```  
- Visit [EdgeGPT](https://github.com/acheong08/EdgeGPT#requirements) to learn more on how to get the cookies.

2. ChatGPT 

```sh
  # Make OPENAI_API_KEY environment variable
  $ gpt-cli-image <Your Prompt>
```

For more info run `$gpt-cli-image -h` or `$gpt-cli-emage -h`.

## Highlight
<details>
<summary>
<table>
<thead>
<tr><th style="text-align: right;">  No.</th><th>Command          </th><th>Action                                     </th></tr>
</thead>
<tbody>
<tr><td style="text-align: right;">    0</td><td>./{command}      </td><td>Run command against system                 </td></tr>
<tr><td style="text-align: right;">    1</td><td>img              </td><td>Generate image ChatGPT based on prompt     </td></tr>
<tr><td style="text-align: right;">    2</td><td>emg              </td><td>Generate image with EdgeGPT based on prompt</td></tr>
<tr><td style="text-align: right;">    3</td><td>txt2img          </td><td>Generate image based on GPT description    </td></tr>
<tr><td style="text-align: right;">    4</td><td>_font_color      </td><td>Modify font-color                          </td></tr>
<tr><td style="text-align: right;">    5</td><td>_background_color</td><td>Modify background_color                    </td></tr>
<tr><td style="text-align: right;">    6</td><td>_prompt          </td><td>Modify terminal prompt                     </td></tr>
<tr><td style="text-align: right;">    7</td><td>_save            </td><td>Save current configurations to `.json` file</td></tr>
<tr><td style="text-align: right;">    8</td><td>_load            </td><td>Load configurations from file              </td></tr>
<tr><td style="text-align: right;">    9</td><td>_rollback        </td><td>Rollback Chat by {n} times                 </td></tr>
<tr><td style="text-align: right;">   10</td><td>_reset           </td><td>Reset current chat and start new           </td></tr>
<tr><td style="text-align: right;">   11</td><td>_help            </td><td>Show this help info                        </td></tr>
<tr><td style="text-align: right;">   12</td><td>{Any Other}      </td><td>Chat with ChatGPT                          </td></tr>
</tbody>
</table>
</summary>

1.img : Text-to-Image converter - ChatGPT
 - e.g ```img Toddler cartoon coding in Python```

2.emg : Text-to-Image converter - EdgeGPT
 - e.g ```emg Toddler cartoon coding in Python```

3.txt2img : Generate image based on GPT description
 - e.g ```txt2img Describe phenotype anatomy of ancient dinosaurs```

4._font_color : modifies font-color
 - e.g ```font_color input red```

5._background_color : modifies background_color
 - e.g ```background_color cyan```

6._prompt : Modify CMD prompt
 - e.g ```prompt ┌─[Smartwa@GPT-CLI]─(%H:%M:%S)```

7._load : Load configurations from the json file
 - e.g ```load DAN.json```

8._save : Save the current Chat Configurations
 - e.g ```save DAN.json```

9._rollback : Rollback the Chat by the {n} time(s)
 - e.g ```_rollback 2```

10._reset : Reset current chat and start new
 - e.g ```_reset Chat as if you are a 10 year old child```

11.bard : Specifies to use bard GPT
 - e.g ```bard Explain the composite concept in business```

12.gpt4 : Specifies to use ChatGPT in case `--bard` was made default
 - e.g ```gpt4 How do you make?```

13._help : Show this help info

* Use  `./` (fullstop and forward slash) to interact with **system commands**
 - e.g ```./ifconfig```

 * Use `_botchat` to let the 2 GPTs chat to each other

> **Note** You can further specify the GPT to be used by appending `--gpt4` or `--bard` in the prompt.

* Use *{{f.text-filename}}* to issue prompt contained in the 'text-filename'

</details>

<details>

<summary>

For more info run `gpt-cli -h`.

</summary>

```
╭─────────────────────────────── gpt-cli v1.5.3 ───────────────────────────────╮
│                                                                              │
│             Repo : https://github.com/Simatwa/gpt-cli                        │
│             By   : Smartwa Caleb                                             │
╰──────────────────────────────────────────────────────────────────────────────╯
usage: gpt-cli [-h] [-v] [-m gpt-3.5-turbo|gpt-4|gpt-4-32k] [-t [0.1-1]]
               [-mt [1-7000]] [-tp [0.1-1]] [-f [0.1-2]] [-p [0.1-2]] [-k KEY]
               [-kp path] [-ic [cyan|green|yellow|red]]
               [-oc [cyan|green|yellow|red]] [-bc [blue,magenta,black,reset]]
               [-pc [cyan|green|yellow|red]] [--prompt [SETTINGS ...]]
               [-tm value] [-pr PROXY] [-rc value] [-g 1,4] [-sp [text ...]]
               [-fp path] [-o path] [-pp prefix] [-rp prefix]
               [-dm keys|values|show|{fnm}] [-dl symbol] [-cf path] [-bk KEY]
               [-bkp PATH] [-bcf PATH] [-si TIME] [-spin 1|2]
               [--disable-stream] [--new-record] [--disable-recording]
               [--zero-show] [--bard] [--markdown] [--update] [--sudo]
               [message ...]

Interact with ChatGPT and Bard at the terminal.

positional arguments:
  message               Message to be send.

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -m gpt-3.5-turbo|gpt-4|gpt-4-32k, --model gpt-3.5-turbo|gpt-4|gpt-4-32k
                        ChatGPT model to be used
  -t [0.1-1], --temperature [0.1-1]
                        Charge of the generated text's randomness
  -mt [1-7000], --max-tokens [1-7000]
                        Maximum number of tokens to be generated upon
                        completion
  -tp [0.1-1], --top-p [0.1-1]
                        Sampling threshold during inference time
  -f [0.1-2], --frequency-penalty [0.1-2]
                        Chances of word being repeated
  -p [0.1-2], --presence-frequency [0.1-2]
                        Chances of topic being repeated
  -k KEY, --key KEY     OPENAI-API-KEY
  -kp path, --key-path path
                        Path to text-file containing GPT-api key
  -ic [cyan|green|yellow|red], --input-color [cyan|green|yellow|red]
                        Font color for inputs
  -oc [cyan|green|yellow|red], --output-color [cyan|green|yellow|red]
                        Font color for outputs
  -bc [blue,magenta,black,reset], --background-color [blue,magenta,black,reset]
                        Console's background-color
  -pc [cyan|green|yellow|red], --prompt-color [cyan|green|yellow|red]
                        Prompt's display color
  --prompt [SETTINGS ...]
                        Customizes the prompt display
  -tm value, --timeout value
                        Request timeout while making request - (Soon)
  -pr PROXY, --proxy PROXY
                        Pivot request through this proxy
  -rc value, --reply-count value
                        Number of responses to be received
  -g 1,4, --gpt 1,4     ChatGPT version to be used
  -sp [text ...], --system-prompt [text ...]
                        Text to train ChatGPT at the start
  -fp path, --file-path path
                        Path to .csv file containing role and prompt -
                        [act,prompt]
  -o path, --output path
                        Filepath for saving the chats - default
                        [/home/smartwa/git/gpt-cli/.chatgpt-history.txt]
  -pp prefix, --prompt-prefix prefix
                        Text to append before saving each prompt - default
                        [>>> timestamp]
  -rp prefix, --response-prefix prefix
                        Text to append before saving each response - default
                        [None]
  -dm keys|values|show|{fnm}, --dump keys|values|show|{fnm}
                        Stdout [keys,values]; Save all prompts in json format
                        to a file
  -dl symbol, --delimiter symbol
                        Delimeter for the .CSV file - [act,prompt]
  -cf path, --cookie-file path
                        Path to Bing's cookies - for Edge Image Generation
  -bk KEY, --bard-key KEY
                        Bard's session value
  -bkp PATH, --bard-key-path PATH
                        Path to Bard's key path
  -bcf PATH, --bard-cookie-file PATH
                        Path to Bard's cookie file
  -si TIME, --stream-interval TIME
                        Interval for printing responses in (s)
  -spin 1|2, --spinner 1|2
                        Busy bar indicator
  --disable-stream      Specifies not to stream responses from ChatGPT
  --new-record          Override previous chats under the filepath
  --disable-recording   Disable saving prompts and responses
  --zero-show           Specifies not to stdout prompt of the act parsed
  --bard                Make Bard the default GPT
  --markdown            Stdout responses in markdown-format - disables
                        streaming
  --update              Download latest prompts - [awesome-chatgpt-prompts]
  --sudo                Run commands against system with sudo privileges

```

</details>

> **Note** : **gpt-4** *(model)* supports upto *7000* tokens and others *3000*.

> `$ gpt-cli --dump pdf` will generate `all-acts.pdf` file containing latest acts and prompts as shown [here](https://chatgpt-prompts.tiiny.site). 

Visit [acheong08/Bard](https://github.com/acheong08/Bard) for info on how to get the Bard's cookie file and Sessions.

## Motive

<details>

<summary>

Love for `Terminal` ❤️

</summary>

As a `terminal guy` I used to find it uncomfortable to keep shifting from one window to next in order to access ChatGPT even after trying out the [gpt-login](https://github.com/Simatwa/gpt-login), the rest is [here.](https://github.com/Simatwa/gpt-cli)
</details>

## Contributions

- Anyone is free to [fork](https://github.com/Simatwa/gpt-cli/fork), submit an [issue](https://github.com/Simatwa/gpt-cli/issues) without any **guideline** or submitting a [pull request](https://github.com/Simatwa/gpt-cli/pulls).

### ToDo

- [x] Use dialogue
- [x] Issue prompt from a file
- [x] Busy bar
- [ ] Add prompts to the [prompts.csv](https://github.com/Simatwa/gpt-cli/edit/main/assets/prompts.csv)

  > Review [CHANGELOG](https://github.com/Simatwa/gpt-cli/blob/main/docs/CHANGELOG.md)

## Acknowledgements

1. [remo7777](https://github.com/remo7777/T-Header)

2. [acheong08](https://github.com/acheong08/ChatGPT)

3. [f](https://github.com/f/awesome-chatgpt-prompts)

You wanna save your bill? Well, purpose to make use of [WebChatGPT](https://github.com/Simatwa/WebChatGPT), which is reverse engineer of ChatGPT web-version.

> **Note** Consider supporting this project by purchasing [Prompts for ChatGPT and Bard](https://payhip.com/b/zxQM0) ebook.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Simatwa/gpt-cli",
    "name": "chatgpt4-cli",
    "maintainer": "Smartwa Caleb",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Smartwa Caleb",
    "author_email": "smartwacaleb@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/24/7b/ffa7990d93851de370e45a86de8a2b0608edbd7a87306b29c569234bbc19/chatgpt4-cli-1.5.9.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">gpt-cli</h1>\n<p align=\"center\">\n<a href=\"https://github.com/Simatwa/gpt-cli\"><img src=\"https://img.shields.io/static/v1?logo=Github&label=Github&message=Passing&color=lime\" alt=\"Gihtub\"/></a>\n<a href=\"https://pypi.org/project/chatgpt4-cli/\"><img src=\"https://img.shields.io/static/v1?label=Pypi&message=v1.5.9&color=green&logo=pypi\" alt=\"Pypi\"/>\n<a href=\"https://wakatime.com/badge/github/Simatwa/gpt-cli\"><img src=\"https://wakatime.com/badge/github/Simatwa/gpt-cli.svg\" alt=\"wakatime\"/></a>\n<a href=\"#\"><img src=\"https://img.shields.io/static/v1?label=License&message=MIT&color=green&logo=MIT\" alt=\"license\"/></a>\n<a href=\"#\"><img src=\"https://img.shields.io/static/v1?label=Development&message=Beta&color=Orange&logo=progress\" alt=\"Progress\"/></a>\n<a href=\"#\"><img src=\"https://img.shields.io/static/v1?label=Code Style&message=Black&color=black&logo=Black\" alt=\"Code-style\"/></a>\n<a href=\"#\"><img src=\"https://img.shields.io/static/v1?label=Coverage&message=80%&color=green\" alt=\"Coverage\"/></a>\n<a href=\"https://pepy.tech/project/chatgpt4-cli\"><img src=\"https://static.pepy.tech/badge/chatgpt4-cli\" alt=\"Downloads\"/></a>\n</p>\n\nCLI tool for interacting with [ChatGPT](https://openai.com) and [Bard](https://bard.google.com).\n> Generate images with BingImageCreator and ChatGPT's DALL-E models.\n\n![screenshot](https://github.com/Simatwa/gpt-cli/raw/main/assets/Screenshot1.png)\n\n### Features\n\n- Chat with ChatGPT and Bard conversationally.\n- Let **ChatGPT** and **Bard** chat to each other.\n- Generate Images (DALL-E & BingImageCreator)- Based on your prompt or GPT generated description.\n- Stream or Non-stream responses.\n- Maintain record of the chats.\n- Parse [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts) easily.\n- Fully customizable Commandline Interface.\n- Interact with system commands on the fly.\n\n### Prerequisites\n\n- [x] [OPENAI_API_KEY](https://platform.openai.com/account/api-keys)\n\n- [x] [Bard Cookies](https://bard.google.com)\n\n- [x] [Bing cookies](https://bing.com) - *optional*\n\n## Installation\n\nEither of the following ways will get you ready.\n\n1. Using pip\n\n- From pypi\n\n```sh\nsudo pip install chatgpt4-cli\n```\n\n- Installing from source\n\n```sh\n sudo pip install git+https://github.com/Simatwa/gpt-cli.git\n ```\n\n2. Cloning locally and install\n\n```sh\ngit clone https://github.com/Simatwa/gpt-cli.git\ncd gpt-cli\npip install .\n #or\nsudo pip install .\n```\n\n## Usage \n\n- Make OPENAI_API_KEY an environment variable.\n\n`$ export OPENAI_API_KEY=<openai-api-key>`\n\nAfter that you can launch the script with or without a prompt\n\n> For instance :\n```sh \n    #Without a prompt\n   $ gpt-cli \n    # With a prompt \n   $ gpt-cli Write a conversation between Sun and Pluto.`\n```\n\n- Parsing OPENAI_API_KEY as one of the arguments\n\nRun `$ gpt-cli -k <openai-api-key> <Your query>` at the terminal.\n\n> For instance :\n\n```sh\n$ gpt-cli -k xxxxxxxxxxxxxxxxxx How to scan for SMB vulnerability using NMAP?\n```\n\nThe [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts) can be parsed to the script through the following ways:\n\n- Specifying the role - (*case-sensitive*)\n\n    e.g `$ gpt-cli UX/UI Developer`\n\n- Specifying the index of the prompt:\n\n    e.g `$ gpt-cli 29`\n\nRun `$ gpt-cli --dump show` to view the act,prompt and their **indexes**\n\nYou can as well generate images using EdgeGPT (DALL-E) or ChatGPT independent of `gpt-cli`, uninteractively at the terminal:\n\n1. EdgeGPT \n\n```sh\n$ gpt-cli-emage --cookie-file <path> <Your prompt>\n```  \n- Visit [EdgeGPT](https://github.com/acheong08/EdgeGPT#requirements) to learn more on how to get the cookies.\n\n2. ChatGPT \n\n```sh\n  # Make OPENAI_API_KEY environment variable\n  $ gpt-cli-image <Your Prompt>\n```\n\nFor more info run `$gpt-cli-image -h` or `$gpt-cli-emage -h`.\n\n## Highlight\n<details>\n<summary>\n<table>\n<thead>\n<tr><th style=\"text-align: right;\">  No.</th><th>Command          </th><th>Action                                     </th></tr>\n</thead>\n<tbody>\n<tr><td style=\"text-align: right;\">    0</td><td>./{command}      </td><td>Run command against system                 </td></tr>\n<tr><td style=\"text-align: right;\">    1</td><td>img              </td><td>Generate image ChatGPT based on prompt     </td></tr>\n<tr><td style=\"text-align: right;\">    2</td><td>emg              </td><td>Generate image with EdgeGPT based on prompt</td></tr>\n<tr><td style=\"text-align: right;\">    3</td><td>txt2img          </td><td>Generate image based on GPT description    </td></tr>\n<tr><td style=\"text-align: right;\">    4</td><td>_font_color      </td><td>Modify font-color                          </td></tr>\n<tr><td style=\"text-align: right;\">    5</td><td>_background_color</td><td>Modify background_color                    </td></tr>\n<tr><td style=\"text-align: right;\">    6</td><td>_prompt          </td><td>Modify terminal prompt                     </td></tr>\n<tr><td style=\"text-align: right;\">    7</td><td>_save            </td><td>Save current configurations to `.json` file</td></tr>\n<tr><td style=\"text-align: right;\">    8</td><td>_load            </td><td>Load configurations from file              </td></tr>\n<tr><td style=\"text-align: right;\">    9</td><td>_rollback        </td><td>Rollback Chat by {n} times                 </td></tr>\n<tr><td style=\"text-align: right;\">   10</td><td>_reset           </td><td>Reset current chat and start new           </td></tr>\n<tr><td style=\"text-align: right;\">   11</td><td>_help            </td><td>Show this help info                        </td></tr>\n<tr><td style=\"text-align: right;\">   12</td><td>{Any Other}      </td><td>Chat with ChatGPT                          </td></tr>\n</tbody>\n</table>\n</summary>\n\n1.img : Text-to-Image converter - ChatGPT\n - e.g ```img Toddler cartoon coding in Python```\n\n2.emg : Text-to-Image converter - EdgeGPT\n - e.g ```emg Toddler cartoon coding in Python```\n\n3.txt2img : Generate image based on GPT description\n - e.g ```txt2img Describe phenotype anatomy of ancient dinosaurs```\n\n4._font_color : modifies font-color\n - e.g ```font_color input red```\n\n5._background_color : modifies background_color\n - e.g ```background_color cyan```\n\n6._prompt : Modify CMD prompt\n - e.g ```prompt \u250c\u2500[Smartwa@GPT-CLI]\u2500(%H:%M:%S)```\n\n7._load : Load configurations from the json file\n - e.g ```load DAN.json```\n\n8._save : Save the current Chat Configurations\n - e.g ```save DAN.json```\n\n9._rollback : Rollback the Chat by the {n} time(s)\n - e.g ```_rollback 2```\n\n10._reset : Reset current chat and start new\n - e.g ```_reset Chat as if you are a 10 year old child```\n\n11.bard : Specifies to use bard GPT\n - e.g ```bard Explain the composite concept in business```\n\n12.gpt4 : Specifies to use ChatGPT in case `--bard` was made default\n - e.g ```gpt4 How do you make?```\n\n13._help : Show this help info\n\n* Use  `./` (fullstop and forward slash) to interact with **system commands**\n - e.g ```./ifconfig```\n\n * Use `_botchat` to let the 2 GPTs chat to each other\n\n> **Note** You can further specify the GPT to be used by appending `--gpt4` or `--bard` in the prompt.\n\n* Use *{{f.text-filename}}* to issue prompt contained in the 'text-filename'\n\n</details>\n\n<details>\n\n<summary>\n\nFor more info run `gpt-cli -h`.\n\n</summary>\n\n```\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 gpt-cli v1.5.3 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502                                                                              \u2502\n\u2502             Repo : https://github.com/Simatwa/gpt-cli                        \u2502\n\u2502             By   : Smartwa Caleb                                             \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\nusage: gpt-cli [-h] [-v] [-m gpt-3.5-turbo|gpt-4|gpt-4-32k] [-t [0.1-1]]\n               [-mt [1-7000]] [-tp [0.1-1]] [-f [0.1-2]] [-p [0.1-2]] [-k KEY]\n               [-kp path] [-ic [cyan|green|yellow|red]]\n               [-oc [cyan|green|yellow|red]] [-bc [blue,magenta,black,reset]]\n               [-pc [cyan|green|yellow|red]] [--prompt [SETTINGS ...]]\n               [-tm value] [-pr PROXY] [-rc value] [-g 1,4] [-sp [text ...]]\n               [-fp path] [-o path] [-pp prefix] [-rp prefix]\n               [-dm keys|values|show|{fnm}] [-dl symbol] [-cf path] [-bk KEY]\n               [-bkp PATH] [-bcf PATH] [-si TIME] [-spin 1|2]\n               [--disable-stream] [--new-record] [--disable-recording]\n               [--zero-show] [--bard] [--markdown] [--update] [--sudo]\n               [message ...]\n\nInteract with ChatGPT and Bard at the terminal.\n\npositional arguments:\n  message               Message to be send.\n\noptions:\n  -h, --help            show this help message and exit\n  -v, --version         show program's version number and exit\n  -m gpt-3.5-turbo|gpt-4|gpt-4-32k, --model gpt-3.5-turbo|gpt-4|gpt-4-32k\n                        ChatGPT model to be used\n  -t [0.1-1], --temperature [0.1-1]\n                        Charge of the generated text's randomness\n  -mt [1-7000], --max-tokens [1-7000]\n                        Maximum number of tokens to be generated upon\n                        completion\n  -tp [0.1-1], --top-p [0.1-1]\n                        Sampling threshold during inference time\n  -f [0.1-2], --frequency-penalty [0.1-2]\n                        Chances of word being repeated\n  -p [0.1-2], --presence-frequency [0.1-2]\n                        Chances of topic being repeated\n  -k KEY, --key KEY     OPENAI-API-KEY\n  -kp path, --key-path path\n                        Path to text-file containing GPT-api key\n  -ic [cyan|green|yellow|red], --input-color [cyan|green|yellow|red]\n                        Font color for inputs\n  -oc [cyan|green|yellow|red], --output-color [cyan|green|yellow|red]\n                        Font color for outputs\n  -bc [blue,magenta,black,reset], --background-color [blue,magenta,black,reset]\n                        Console's background-color\n  -pc [cyan|green|yellow|red], --prompt-color [cyan|green|yellow|red]\n                        Prompt's display color\n  --prompt [SETTINGS ...]\n                        Customizes the prompt display\n  -tm value, --timeout value\n                        Request timeout while making request - (Soon)\n  -pr PROXY, --proxy PROXY\n                        Pivot request through this proxy\n  -rc value, --reply-count value\n                        Number of responses to be received\n  -g 1,4, --gpt 1,4     ChatGPT version to be used\n  -sp [text ...], --system-prompt [text ...]\n                        Text to train ChatGPT at the start\n  -fp path, --file-path path\n                        Path to .csv file containing role and prompt -\n                        [act,prompt]\n  -o path, --output path\n                        Filepath for saving the chats - default\n                        [/home/smartwa/git/gpt-cli/.chatgpt-history.txt]\n  -pp prefix, --prompt-prefix prefix\n                        Text to append before saving each prompt - default\n                        [>>> timestamp]\n  -rp prefix, --response-prefix prefix\n                        Text to append before saving each response - default\n                        [None]\n  -dm keys|values|show|{fnm}, --dump keys|values|show|{fnm}\n                        Stdout [keys,values]; Save all prompts in json format\n                        to a file\n  -dl symbol, --delimiter symbol\n                        Delimeter for the .CSV file - [act,prompt]\n  -cf path, --cookie-file path\n                        Path to Bing's cookies - for Edge Image Generation\n  -bk KEY, --bard-key KEY\n                        Bard's session value\n  -bkp PATH, --bard-key-path PATH\n                        Path to Bard's key path\n  -bcf PATH, --bard-cookie-file PATH\n                        Path to Bard's cookie file\n  -si TIME, --stream-interval TIME\n                        Interval for printing responses in (s)\n  -spin 1|2, --spinner 1|2\n                        Busy bar indicator\n  --disable-stream      Specifies not to stream responses from ChatGPT\n  --new-record          Override previous chats under the filepath\n  --disable-recording   Disable saving prompts and responses\n  --zero-show           Specifies not to stdout prompt of the act parsed\n  --bard                Make Bard the default GPT\n  --markdown            Stdout responses in markdown-format - disables\n                        streaming\n  --update              Download latest prompts - [awesome-chatgpt-prompts]\n  --sudo                Run commands against system with sudo privileges\n\n```\n\n</details>\n\n> **Note** : **gpt-4** *(model)* supports upto *7000* tokens and others *3000*.\n\n> `$ gpt-cli --dump pdf` will generate `all-acts.pdf` file containing latest acts and prompts as shown [here](https://chatgpt-prompts.tiiny.site). \n\nVisit [acheong08/Bard](https://github.com/acheong08/Bard) for info on how to get the Bard's cookie file and Sessions.\n\n## Motive\n\n<details>\n\n<summary>\n\nLove for `Terminal` \u2764\ufe0f\n\n</summary>\n\nAs a `terminal guy` I used to find it uncomfortable to keep shifting from one window to next in order to access ChatGPT even after trying out the [gpt-login](https://github.com/Simatwa/gpt-login), the rest is [here.](https://github.com/Simatwa/gpt-cli)\n</details>\n\n## Contributions\n\n- Anyone is free to [fork](https://github.com/Simatwa/gpt-cli/fork), submit an [issue](https://github.com/Simatwa/gpt-cli/issues) without any **guideline** or submitting a [pull request](https://github.com/Simatwa/gpt-cli/pulls).\n\n### ToDo\n\n- [x] Use dialogue\n- [x] Issue prompt from a file\n- [x] Busy bar\n- [ ] Add prompts to the [prompts.csv](https://github.com/Simatwa/gpt-cli/edit/main/assets/prompts.csv)\n\n  > Review [CHANGELOG](https://github.com/Simatwa/gpt-cli/blob/main/docs/CHANGELOG.md)\n\n## Acknowledgements\n\n1. [remo7777](https://github.com/remo7777/T-Header)\n\n2. [acheong08](https://github.com/acheong08/ChatGPT)\n\n3. [f](https://github.com/f/awesome-chatgpt-prompts)\n\nYou wanna save your bill? Well, purpose to make use of [WebChatGPT](https://github.com/Simatwa/WebChatGPT), which is reverse engineer of ChatGPT web-version.\n\n> **Note** Consider supporting this project by purchasing [Prompts for ChatGPT and Bard](https://payhip.com/b/zxQM0) ebook.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Interact with ChatGPT and Bard at the terminal.",
    "version": "1.5.9",
    "project_urls": {
        "Bug Report": "https://github.com/Simatwa/gpt-cli/issues/new",
        "Homepage": "https://github.com/Simatwa/gpt-cli"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9bcb3449ae6767220e6c328a47a38b3c10223a6b323d870d24d3191329da91fc",
                "md5": "fa934d0b1992924e15e6e484515ad678",
                "sha256": "b2f0fa515d8fdd7840d1472bec83bf882f43f7895fd6f2c026069d767c4370b6"
            },
            "downloads": -1,
            "filename": "chatgpt4_cli-1.5.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fa934d0b1992924e15e6e484515ad678",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 25198,
            "upload_time": "2024-01-16T22:33:09",
            "upload_time_iso_8601": "2024-01-16T22:33:09.738883Z",
            "url": "https://files.pythonhosted.org/packages/9b/cb/3449ae6767220e6c328a47a38b3c10223a6b323d870d24d3191329da91fc/chatgpt4_cli-1.5.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "247bffa7990d93851de370e45a86de8a2b0608edbd7a87306b29c569234bbc19",
                "md5": "9672955ca83e4761c74e21a07c28f5fe",
                "sha256": "1651f179503beedb0d23136886bfdd6e126708feadb44d9b6809c7c657490fbe"
            },
            "downloads": -1,
            "filename": "chatgpt4-cli-1.5.9.tar.gz",
            "has_sig": false,
            "md5_digest": "9672955ca83e4761c74e21a07c28f5fe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 22724,
            "upload_time": "2024-01-16T22:33:11",
            "upload_time_iso_8601": "2024-01-16T22:33:11.710411Z",
            "url": "https://files.pythonhosted.org/packages/24/7b/ffa7990d93851de370e45a86de8a2b0608edbd7a87306b29c569234bbc19/chatgpt4-cli-1.5.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-16 22:33:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Simatwa",
    "github_project": "gpt-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": [
                [
                    ">=",
                    "1.23.4"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    ">=",
                    "0.4.6"
                ]
            ]
        },
        {
            "name": "openai",
            "specs": [
                [
                    ">=",
                    "0.26.4"
                ]
            ]
        },
        {
            "name": "revChatGPT",
            "specs": [
                [
                    "==",
                    "4.0.6"
                ]
            ]
        },
        {
            "name": "appdirs",
            "specs": [
                [
                    ">=",
                    "1.4.4"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.28.2"
                ]
            ]
        },
        {
            "name": "tabulate",
            "specs": [
                [
                    ">=",
                    "0.9.0"
                ]
            ]
        },
        {
            "name": "GoogleBard",
            "specs": [
                [
                    "==",
                    "1.4.0"
                ]
            ]
        },
        {
            "name": "fpdf",
            "specs": [
                [
                    "==",
                    "1.7.2"
                ]
            ]
        }
    ],
    "lcname": "chatgpt4-cli"
}
        
Elapsed time: 0.16703s