{"id":13638357,"url":"https://github.com/jpal91/xontrib-chatgpt","last_synced_at":"2025-04-23T03:22:31.413Z","repository":{"id":197786603,"uuid":"697763891","full_name":"jpal91/xontrib-chatgpt","owner":"jpal91","description":"Gives the ability to use ChatGPT directly from the command line on the Xonsh Shell","archived":false,"fork":false,"pushed_at":"2024-08-12T09:47:46.000Z","size":325,"stargazers_count":12,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T23:32:58.591Z","etag":null,"topics":["chatgpt","cli","openai","shell","shell-extension","terminal","xonsh","xontrib"],"latest_commit_sha":null,"homepage":"https://github.com/jpal91/xontrib-chatgpt","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpal91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-09-28T12:32:30.000Z","updated_at":"2025-04-03T04:49:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"acb3ee56-cc54-4151-8531-eb61467a30fc","html_url":"https://github.com/jpal91/xontrib-chatgpt","commit_stats":null,"previous_names":["jpal91/xontrib-chatgpt"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpal91%2Fxontrib-chatgpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpal91%2Fxontrib-chatgpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpal91%2Fxontrib-chatgpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpal91%2Fxontrib-chatgpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpal91","download_url":"https://codeload.github.com/jpal91/xontrib-chatgpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250361553,"owners_count":21417914,"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","cli","openai","shell","shell-extension","terminal","xonsh","xontrib"],"created_at":"2024-08-02T01:00:44.634Z","updated_at":"2025-04-23T03:22:31.395Z","avatar_url":"https://github.com/jpal91.png","language":"Python","funding_links":[],"categories":["Plugins"],"sub_categories":["Prompt tweaks"],"readme":"\u003cp align=\"center\"\u003e\nGives the ability to use ChatGPT directly from the command line\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nIf you like the idea click ⭐ on the repo and \u003ca href=\"https://twitter.com/intent/tweet?text=Nice%20xontrib%20for%20the%20xonsh%20shell!\u0026url=https://github.com/jpal91/xontrib-chatgpt\" target=\"_blank\"\u003etweet\u003c/a\u003e.\n\u003c/p\u003e\n\n![Chat Screenshot](assets/chatgpt_xonsh_v013.png)\n\n## Installation\n\nTo install use pip:\n\n```xsh\nxpip install xontrib-chatgpt\n# or: xpip install -U git+https://github.com/jpal91/xontrib-chatgpt\n```\n\nThen use the following command in your `xonsh` shell or add it directly to your `.xonshrc`\n\n```xsh\nxontrib load chatgpt\n```\n\n### Environment Variables\n\n❗**REQUIRED** ❗\n```xsh\n# Recommended you put this in your .xonshrc\n$OPENAI_API_KEY = \u003cyour api key\u003e\n```\nIf you do not have an api key, you can create an account on [OpenAI](https://openai.com/). You will need to add a credit card on file to pay for any of the api usage charges. \n\n*You are 100% responsible for any and all cost you incur by using this xontrib.* \n\nFor more information on `OpenAI` usage pricing, please go to [OpenAI Pricing](https://openai.com/pricing).\n\n**Optional**\n```xsh\n$OPENAI_CHAT_MODEL = 'gpt-3.5-turbo'\n```\nIf this is not set, it will default to `gpt-3.5-turbo`. Currently the only accepted options are `gpt-3.5-turbo` or `gpt-4`.\n\n## Usage\n\n**NEW in Version 0.1.3**\n\nUse `chat-manager` to easily create and manage new chats\n\n```xsh\nchat-manager add gpt\ngpt! Hello, what's your name?\n# ChatGPT responds here\n```\n\nUse your chat as a callable alias or `xonsh` context block\n\n```xsh\necho \"Hello, what's your name\" | gpt\ngpt \u003c input.txt\necho @(myvar) | gpt\n\n# The entire contents of the block is sent as text to ChatGPT\nwith! gpt:\n   Can you help me fix my python function?\n\n   def hello_world():\n      return\n      print('Hello, world!')\n```\n\nTo get see more CLI options:\n\n```xsh\nchat-manager -h\n```\n\nTo get a quick tutorial:\n\n```xsh\nchat-manager help\n# or\nchat-manager?\n```\n\n⭐ **BONUS**: If [xontrib-abbrevs](https://github.com/xonsh/xontrib-abbrevs) is loaded, use `cm` to expand to `chat-manager`\n\n#### See Also\n- [Tips and Tricks](/docs/tips_and_tricks.md)\n- [How To Edit System Messages](/docs/edit_sys_messages.md)\n\n## Future Plans\n- **Streaming Responses**\n   - Expand the ability to get streaming responses on the command line as opposed to waiting until the full completion is done\n- **Chat Settings**\n   - Allow customizable max tokens\n   - Allow each chat to have separate models (ie 3.5-turbo, 4, etc.)\n   - Timeouts on long responses\n   - ~~Update individual instance system messages/chat instructions~~ **NEW in v0.1.6**\n- **Additional Models**\n   - Open up the ability to use other models besides 3.5 and 4\n- ~~**Completions**~~ **NEW in v0.1.5**\n   - ~~Helper completions for `chat-manager`~~\n\n\n## Credits\n\n- This package was created with [xontrib template](https://github.com/xonsh/xontrib-template).\n- [Xonsh Documentation](https://xon.sh/contents.html)\n- [prompt_toolkit](https://python-prompt-toolkit.readthedocs.io/)\n- [Pygments](https://pygments.org/docs/)\n- [Awesome Xontribs](https://github.com/xonsh/awesome-xontribs) - Much inspiration was taken from many projects in this fantastic repo\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpal91%2Fxontrib-chatgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpal91%2Fxontrib-chatgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpal91%2Fxontrib-chatgpt/lists"}