Package: chatgpt4-cli
gpt-cliCLI tool for interacting withChatGPTandBard.Generate images with BingImageCreator and ChatGPT's DALL-E models.FeaturesChat with ChatGPT and Bard conversationally.LetChatGPTandBardchat 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.Parseawesome-chatgpt-promptseasily.Fully customizable Commandline Interface.Interact with system commands on the fly.PrerequisitesOPENAI_API_KEYBard CookiesBing cookies-optionalInstallationEither of the following ways will get you ready.Using pipFrom pypisudopipinstallchatgpt4-cliInstalling from sourcesudopipinstallgit+https://github.com/Simatwa/gpt-cli.gitCloning locally and installgitclonehttps://github.com/Simatwa/gpt-cli.gitcdgpt-cli
pipinstall.#orsudopipinstall.UsageMake OPENAI_API_KEY an environment variable.$ export OPENAI_API_KEY=<openai-api-key>After that you can launch the script with or without a promptFor instance :#Without a prompt$gpt-cli# With a prompt$gpt-cliWriteaconversationbetweenSunandPluto.`Parsing OPENAI_API_KEY as one of the argumentsRun$ gpt-cli -k <openai-api-key> <Your query>at the terminal.For instance :$gpt-cli-kxxxxxxxxxxxxxxxxxxHowtoscanforSMBvulnerabilityusingNMAP?Theawesome-chatgpt-promptscan be parsed to the script through the following ways:Specifying the role - (case-sensitive)e.g$ gpt-cli UX/UI DeveloperSpecifying the index of the prompt:e.g$ gpt-cli 29Run$ gpt-cli --dump showto view the act,prompt and theirindexesYou can as well generate images using EdgeGPT (DALL-E) or ChatGPT independent ofgpt-cli, uninteractively at the terminal:EdgeGPT$gpt-cli-emage--cookie-file<path><Yourprompt>VisitEdgeGPTto learn more on how to get the cookies.ChatGPT# Make OPENAI_API_KEY environment variable$gpt-cli-image<YourPrompt>For more info run$gpt-cli-image -hor$gpt-cli-emage -h.HighlightNo.CommandAction0./{command}Run command against system1imgGenerate image ChatGPT based on prompt2emgGenerate image with EdgeGPT based on prompt3txt2imgGenerate image based on GPT description4_font_colorModify font-color5_background_colorModify background_color6_promptModify terminal prompt7_saveSave current configurations to `.json` file8_loadLoad configurations from file9_rollbackRollback Chat by {n} times10_resetReset current chat and start new11_helpShow this help info12{Any Other}Chat with ChatGPT1.img : Text-to-Image converter - ChatGPTe.gimg Toddler cartoon coding in Python2.emg : Text-to-Image converter - EdgeGPTe.gemg Toddler cartoon coding in Python3.txt2img : Generate image based on GPT descriptione.gtxt2img Describe phenotype anatomy of ancient dinosaurs4._font_color : modifies font-colore.gfont_color input red5._background_color : modifies background_colore.gbackground_color cyan6._prompt : Modify CMD prompte.gprompt ┌─[Smartwa@GPT-CLI]─(%H:%M:%S)7._load : Load configurations from the json filee.gload DAN.json8._save : Save the current Chat Configurationse.gsave DAN.json9._rollback : Rollback the Chat by the {n} time(s)e.g_rollback 210._reset : Reset current chat and start newe.g_reset Chat as if you are a 10 year old child11.bard : Specifies to use bard GPTe.gbard Explain the composite concept in business12.gpt4 : Specifies to use ChatGPT in case--bardwas made defaulte.ggpt4 How do you make?13._help : Show this help infoUse./(fullstop and forward slash) to interact withsystem commandse.g./ifconfigUse_botchatto let the 2 GPTs chat to each otherNoteYou can further specify the GPT to be used by appending--gpt4or--bardin the prompt.Use{{f.text-filename}}to issue prompt contained in the 'text-filename'For more info rungpt-cli -h.╭─────────────────────────────── 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 privilegesNote:gpt-4(model)supports upto7000tokens and others3000.$ gpt-cli --dump pdfwill generateall-acts.pdffile containing latest acts and prompts as shownhere.Visitacheong08/Bardfor info on how to get the Bard's cookie file and Sessions.MotiveLove forTerminal❤️As aterminal guyI used to find it uncomfortable to keep shifting from one window to next in order to access ChatGPT even after trying out thegpt-login, the rest ishere.ContributionsAnyone is free tofork, submit anissuewithout anyguidelineor submitting apull request.ToDoUse dialogueIssue prompt from a fileBusy barAdd prompts to theprompts.csvReviewCHANGELOGAcknowledgementsremo7777acheong08fYou wanna save your bill? Well, purpose to make use ofWebChatGPT, which is reverse engineer of ChatGPT web-version.NoteConsider supporting this project by purchasingPrompts for ChatGPT and Bardebook.