Package: sengpt
SengptChatGPT in your terminal, runs onre-gptso no OpenAI API key requiredInstallation•Configuration•Usage•Building from sourceInstallationEnsure you havePython 3.11andGlowinstalled.pipinstallsengptConfigurationSession tokenGo tohttps://chat.openai.comand log in or sign up.Open the browser developer tools (right click and click "inspect" or "inspect element").Go to the Application tab (try expanding the dev tools window if you can't find it) and expand the Cookies section.Look forhttps://chat.openai.com.Copy the value for __Secure-next-auth.session-token.Runsengpt --session_token <your-session-token-goes-here>.Preconfigured promptsOpen the config file, runsengpt --config_fileto see it's location.Add a field namedpreconfigured_promptsand set it's value to key value pairs of prompt name and value e.g.,{"preconfigured_prompts":{"readme":"generate a README.md for this project","expain":"briefly explain what this code does","refactor":"refactor this code to improve readability"}}To pass the prompt runsengpt --prompt_nameorsengpt -pn.Warning!!! Make sure the short version of the prompt name doesn't clash with each other or with any of sengpt's default flags, i.e., a prompt name likescript_tagswill clash withsession_tokenso every time you try and use it sengpt will think you want to set your session token.The preconfigured prompts are appended to the final prompt i.e.,some_project.py | sengpt --readme make it as brief as possibleModesInteractive modeBack and forth interaction with ChatGPT, saves the conversation on exit.Currently doesn't support piped inputs i.e.,cat README.md | sengpt summarise this document, if piped inputs are passed Query mode will be used instead.PressCtrl + Cto exit.Query modePrint ChatGPT's response, delete the conversation and exit.Default modeThe default mode is interactive mode but you can change this in the config{"default_mode":"query"}With this configuration to use interactive mode runsengpt --interactiveModelsEithergpt-3.5orgpt-4can be used, the default isgpt-3.5.gpt-4requires a ChatGPT Plus account and is slower. To switch togpt-4add this in your config file.{"model":"gpt-4"}UsernameHow your username appears in the conversation, the default isYou.{"username":"Sen"}UsageUsage: sengpt [prompt] [options]

-h, --help Show help message and exit
-v, --version Show the version information
-cf, --config_file Show the config file's contents and location
-st, --session_token Set session token

-ng, --no_glow Disable pretty printing with Glow,
this can be set to be the default behaviour in the config file

-c, --copy Copy the prompt response to the clipboard,
this can be set to be the default behaviour in the config file

-p, --paste Append the most recently copied clipboard text to the sent prompt
-rc, --recent_conversation Use the most recently saved conversation as context
-pp, --preconfigured_prompt Append a preconfigured prompt to the sent prompt,
replace "preconfigured_prompt" with the prompt's name
as it appears in the config file

-q, query Use query mode i.e., print ChatGPT's response and exit,
this flag is only necessary if "default_mode" in config file is interactive

-s, --save By default conversations in query mode are deleted on exit,
this saves the conversation instead,
this can be set to be the default behaviour in the config file

-i, --interactive Use interactive mode i.e., back and forth interaction with ChatGPT,
this flag is only necessary if "default_mode" in the config file is query

-d, --delete By default conversations in interactive mode are saved on exit,
this deletes then exits the interactive mode session,
this can be set to be the default behaviour in the config fileBuilding from SourceEnsure you havePython 3.11andGitinstalled.Set everything up.git clone https://github.com/SenZmaKi/Sengpt && cd Sengpt && pip install poetry && poetry installRun Sengpt.poetry run sengptBuild the package to install with pip.poetry buildThetarandwheelwill be built atSengpt/dist