{"id":13408340,"url":"https://github.com/SenZmaKi/Sengpt","last_synced_at":"2025-03-14T13:30:47.809Z","repository":{"id":217270092,"uuid":"743434178","full_name":"SenZmaKi/Sengpt","owner":"SenZmaKi","description":"ChatGPT in your terminal, no OpenAI API key required","archived":true,"fork":false,"pushed_at":"2024-09-14T16:27:20.000Z","size":831,"stargazers_count":35,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-10T14:11:24.147Z","etag":null,"topics":["chatgpt","chatgpt-app","chatgpt-python","cli","cli-app","freegpt","openai","openai-chatgpt","terminal"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=dQw4w9WgXcQ","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SenZmaKi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"SenZmaKi"}},"created_at":"2024-01-15T08:24:42.000Z","updated_at":"2025-01-19T19:07:44.000Z","dependencies_parsed_at":"2024-09-15T02:07:01.534Z","dependency_job_id":"0233f90c-0470-4786-b707-4cee13cac1cf","html_url":"https://github.com/SenZmaKi/Sengpt","commit_stats":null,"previous_names":["senzmaki/sengpt"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SenZmaKi%2FSengpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SenZmaKi%2FSengpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SenZmaKi%2FSengpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SenZmaKi%2FSengpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SenZmaKi","download_url":"https://codeload.github.com/SenZmaKi/Sengpt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243584093,"owners_count":20314698,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","chatgpt-app","chatgpt-python","cli","cli-app","freegpt","openai","openai-chatgpt","terminal"],"created_at":"2024-07-30T20:00:52.275Z","updated_at":"2025-03-14T13:30:47.448Z","avatar_url":"https://github.com/SenZmaKi.png","language":"Python","readme":"# !!! NOTICE !!!\nDead project since [re_gpt](https://github.com/Zai-Kun/reverse-engineered-chatgpt) is not maintained anymore\n\n\u003ch1 align=\"center\"\u003e\n Sengpt\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  ChatGPT in your terminal, runs on  \n  \u003ca href=\"https://github.com/Zai-Kun/reverse-engineered-chatgpt\"\u003ere_gpt\u003c/a\u003e so no OpenAI API key required\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#configuration\"\u003eConfiguration\u003c/a\u003e •\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#building-from-source\"\u003eBuilding from source\u003c/a\u003e •\n  \u003ca href=\"#support\"\u003eSupport\u003c/a\u003e\n\u003c/p\u003e\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/SenZmaKi/Sengpt/master/.github/assets/demo.gif\" alt=\"demo\"\u003e\n\u003c/div\u003e\n\n## Installation\n\nEnsure you have [Python 3.11](https://www.python.org/downloads/release/python-3111) and [Glow](https://github.com/charmbracelet/glow) installed.\n\n```bash\npip install sengpt\n```\n\n## Configuration\n\n### Session token\n\n- Go to https://chat.openai.com and log in or sign up.\n- Open the browser developer tools (right click and click \"inspect\" or \"inspect element\").\n- Go to the Application tab (try expanding the dev tools window if you can't find it) and expand the Cookies section.\n- Look for https://chat.openai.com.\n- Copy the value for \\_\\_Secure-next-auth.session-token.\n- Run `sengpt --session_token \u003cyour-session-token-goes-here\u003e`.\n\n### Preconfigured prompts\n\n- Open the config file, run `sengpt --config_file` to see its location.\n- Add a field named `preconfigured_prompts` and set its value to key value pairs of prompt name and value e.g.,\n\n````json\n{\n  \"preconfigured_prompts\": {\n    \"readme\": \"generate a README.md for this project\",\n    \"expain\": \"briefly explain what this code does\",\n    \"refactor\": \"refactor this code to improve readability\",\n    \"generate_command\": \"No explanation. Output as literal string plain text i.e., echo Hello World instead of ```bash\\\\necho Hello World\\\\n```. Command as LITERAL string NO Markdown formatting. I want to be able to take your raw output and paste it into my terminal and it just works without me tinkering with it. Generate a command that \"\n  }\n}\n````\n\n- To pass the prompt run `sengpt --prompt_name` or `sengpt -pn`.\n- 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 like `script_tags` will clash with `session_token` so every time you try and use it sengpt will think you want to set your session token.\n- The preconfigured prompts are appended to the final prompt i.e., `some_project.py | sengpt --readme make it as brief as possible`\n\n### Modes\n\n#### Interactive mode\n\nBack and forth interaction with ChatGPT, saves the conversation on exit.\n\nCurrently 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.\n\nPress `Ctrl + C` to exit.\n\n#### Query mode\n\nPrint ChatGPT's response, delete the conversation and exit.\n\n#### Default mode\n\nThe default mode is interactive mode but you can change this in the config\n\n```json\n{\n  \"default_mode\": \"query\"\n}\n```\n\nWith this configuration to use interactive mode run `sengpt --interactive`\n\n### Models\n\nEither `gpt-3.5` or `gpt-4` can be used, the default is `gpt-3.5`. `gpt-4` requires a ChatGPT Plus account and is slower. To switch to `gpt-4` add this in your config file.\n\n```json\n{\n  \"model\": \"gpt-4\"\n}\n```\n\n### Username\n\nHow your username appears in the conversation, the default is `You`.\n\n```json\n{\n  \"username\": \"Sen\"\n}\n```\n\n## Usage\n\n```\n\nUsage: sengpt [prompt] [options]\n\n-h, --help Show help message and exit\n-v, --version Show the version information\n-cf, --config_file Show the config file's contents and location\n-st, --session_token Set session token\n\n-ng, --no_glow Disable pretty printing with Glow,\nthis can be set to be the default behaviour in the config file\n\n-c, --copy Copy the prompt response to the clipboard,\nthis can be set to be the default behaviour in the config file\n\n-p, --paste Append the most recently copied clipboard text to the sent prompt\n-rc, --recent_conversation Use the most recently saved conversation as context\n-pp, --preconfigured_prompt Append a preconfigured prompt to the sent prompt,\nreplace \"preconfigured_prompt\" with the prompt's name\nas it appears in the config file\n\n-q, query Use query mode i.e., print ChatGPT's response and exit,\nthis flag is only necessary if \"default_mode\" in config file is interactive\n\n-s, --save By default conversations in query mode are deleted on exit,\nthis saves the conversation instead,\nthis can be set to be the default behaviour in the config file\n\n-i, --interactive Use interactive mode i.e., back and forth interaction with ChatGPT,\nthis flag is only necessary if \"default_mode\" in the config file is query\n\n-d, --delete By default conversations in interactive mode are saved on exit,\nthis deletes then exits the interactive mode session,\nthis can be set to be the default behaviour in the config file\n\n```\n\n## Building from Source\n\nEnsure you have [Python 3.11](https://www.python.org/downloads/release/python-3111) and [Git](https://github.com/git-guides/install-git) installed.\n\n1. **Set everything up.**\n\n```\ngit clone https://github.com/SenZmaKi/Sengpt \u0026\u0026 cd Sengpt \u0026\u0026 pip install poetry \u0026\u0026 poetry install\n```\n\n2. **Run Sengpt.**\n\n```\npoetry run sengpt\n```\n\n3. **Build the package to install with pip**.\n\n```\npoetry build\n```\n\n- The `tar` and `wheel` will be built at `Sengpt/dist`\n\n## Support\n\n- You can support the development of Sengpt through donations on [GitHub Sponsors](https://github.com/sponsors/SenZmaKi)\n- You can also star the github repository for other terminal enthusiasts and freedom fighters to know about it\n","funding_links":["https://github.com/sponsors/SenZmaKi"],"categories":["\u003ca name=\"ai\"\u003e\u003c/a\u003eAI / ChatGPT"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSenZmaKi%2FSengpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSenZmaKi%2FSengpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSenZmaKi%2FSengpt/lists"}