{"id":13408187,"url":"https://github.com/Brutuski/hal2023-cli","last_synced_at":"2025-03-14T12:32:18.995Z","repository":{"id":152358184,"uuid":"592312052","full_name":"Brutuski/hal2023-cli","owner":"Brutuski","description":"CLI to interface with OpenAI's ChatGPT \u0026 DALL-E","archived":false,"fork":false,"pushed_at":"2023-04-24T07:11:53.000Z","size":7301,"stargazers_count":15,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-07-31T20:29:13.911Z","etag":null,"topics":["ai","artificial-intelligence","bash","bash-script","chat-gpt","chatbot","chatgpt","chatgpt-api","chatgpt-api-wrapper","cli","command-line","dall-e","gpt-4","image-generation","openai","openai-api","shell","shell-script","shell-scripts","terminal"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Brutuski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-01-23T13:11:52.000Z","updated_at":"2024-02-23T10:13:11.000Z","dependencies_parsed_at":"2024-01-07T21:02:11.849Z","dependency_job_id":"9125ddb9-b933-4e26-982b-95ebba13dee8","html_url":"https://github.com/Brutuski/hal2023-cli","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brutuski%2Fhal2023-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brutuski%2Fhal2023-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brutuski%2Fhal2023-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brutuski%2Fhal2023-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brutuski","download_url":"https://codeload.github.com/Brutuski/hal2023-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243578585,"owners_count":20313859,"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":["ai","artificial-intelligence","bash","bash-script","chat-gpt","chatbot","chatgpt","chatgpt-api","chatgpt-api-wrapper","cli","command-line","dall-e","gpt-4","image-generation","openai","openai-api","shell","shell-script","shell-scripts","terminal"],"created_at":"2024-07-30T20:00:51.293Z","updated_at":"2025-03-14T12:32:15.070Z","avatar_url":"https://github.com/Brutuski.png","language":"Shell","funding_links":[],"categories":["\u003ca name=\"ai\"\u003e\u003c/a\u003eAI / ChatGPT"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"./image-assets/logo.svg\" width=\"250\"\u003e\u003cp\u003e\n\u003ch4 align=\"center\"\u003eA simple script to chat with OpenAI's ChatGPT\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n        \u003cimg alt=\"Script\" src=\"https://img.shields.io/badge/Shell_Script-121011?style=for-the-badge\u0026logo=gnu-bash\u0026logoColor=white\"\u003e\n        \u003ca href=\"https://github.com/Brutuski/hal2023-cli/blob/main/LICENSE\"\u003e \u003cimg alt=\"License\" src=\"https://img.shields.io/badge/MIT-LICENSE-1976D2?style=for-the-badge\"\u003e\u003c/a\u003e\n        \u003cimg alt=\"Version\" src=\"https://img.shields.io/badge/v-1.11.11-D8DEE9?style=for-the-badge\"\u003e\n\u003c/p\u003e\n\n### Index\n\n- [Introduction](#introduction)\n- [Getting Started](#getting-started)\n- [Screenshots \u0026 Demo](#screenshots)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Project Structure](#project-structure)\n- [Documentation](#documentation)\n- [OpenAI's Data Policy](#openais-data-policy)\n- [Credit](#credit)\n\n#### Introduction\n\nInspired by the infamous HAL9000 from the cult classic \"2001: A Space Odyssey\", this simple CLI enables you to\ninteract with [OpenAI](https://openai.com)'s [ChatGPT](https://openai.com/blog/chatgpt/) and generate images.\n\n#### Getting Started\n\nYou would need an API key from OpenAI to use this CLI.\nOpen [this link](https://beta.openai.com/account/api-keys) and generate an API key for yourself.\nUpon installation, this CLI stores your personal API key in a file called `.chat-api-key` in your `Home` directory.\n\nThis CLI is using the `gpt-3.5-turbo` model by default. You can read more about\nit [here](https://platform.openai.com/docs/guides/chat).\n\nTo interact with `text-davinci-003` model, simply start your query with `-davinci` followed by a space and the rest of\nyour query after that.\n\n`gpt-4` Model is also available. Start a prompt with `-gpt4` followed by the rest of the query.\n\n#### Screenshots\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"./image-assets/screenshot-1.png\"\u003e\u003cp\u003e\n\u003cp align=\"center\"\u003e\u003cimg src=\"./image-assets/screenshot-2.png\"\u003e\u003cp\u003e\n\u003cp align=\"center\"\u003e\u003cimg src=\"./image-assets/screenshot-3.png\"\u003e\u003cp\u003e\n\u003cp align=\"center\"\u003e\u003cimg src=\"./image-assets/recording.gif\" width=\"750\"\u003e\u003cp\u003e\n\n#### Requirements\n\n- [curl](https://curl.se/)\n- [jq](https://stedolan.github.io/jq/)\n- [wget](https://www.gnu.org/software/wget/)\n\n##### Optional\n\n- [glow](https://github.com/charmbracelet/glow) helps with better output formatting.\n\n#### Installation\n\n```sh\ncurl -sS https://github.com/Brutuski/hal2023-cli/blob/main/build.sh | sudo -E bash\n```\n\n##### Manual Installation\n\n- Download the latest release from [here](https://github.com/Brutuski/hal2023-cli/releases).\n- Unzip it and copy `hal2023` to `/usr/local/bin`.\n- You can copy it into any directory of your choice, but remember to add the path to your `$PATH`.\n- Store your OpenAI API key in your home directory as such `~/.chat-gpt-api`. Paste only your API key in said file with\n  no spaces or newlines.\n\n#### Usage\n\n- Run the command `hal2023`\n\n\n- To exit simply type `exit` or `quit` or `:q`\n\n- Multiline prompts are supported as. Press `enter` once\n  to continue your prompt in a newline. Press `enter` twice to send the prompt.\n\n- Default model is `gpt-3.5-turbo`. If you would like to interact with the `text-davinci-003` model simply start your\n  prompt with `-davinci`\n\n- To interact with `gpt-4` model, start the prompt with `-gpt4` followed by the query.\n\n- Image generation has been added. Simple start your input with `-image ` followed by the image prompt. Generated image\n  URL is shortened using the [tny.im API](https://tny.im/aboutapi.php) and displayed.\n\n- Type `-email` or `--e` and press enter for quick email generation process.\n\n- Type `-article` or `--a` and press enter for quick article generation process.\n\n- Type `-cmd` followed by the query to generate single line shell commands ready to be executed in he terminal.\n\n\n- More options:\n  ```sh\n  make check\n  make about\n  make help\n  ```\n- A history feature has been added as of `v1.4.1`. The history file is created and maintained\n  at `~/.hal2023_history.txt`.\n\n#### Project Structure\n\n```\n├── hal2023                     # Main script\n├── README.md                   # Documentation file\n├── CONTRIBUTING.md             # Contributing document\n├── CODE_OF_CONDUCT.md          # Code of Conduct document\n├── build.sh                    # To install, check requirements and take API key input\n├── image-assets                # Directory for all documentation related image assets\n├── .gitignore                  # File to primarily exclude .idea and .DS_Store\n├── .github                  \n  ├── CHANGELOG.md              # Changelog\n  ├── ISSUES_TEMPLATE.md        # Issues reporting template\n  └── PULL_REQUEST_TEMPLATE.md  # Pull request submission template\n└── LICENSE                     # MIT License file\n```\n\n#### Documentation\n\n[Issues Template](.github/ISSUES_TEMPLATE.md). Please report any issues or feature\nrequests [here](https://github.com/Brutuski/hal2023-cli/issues).\n\nChanges can be tracked in the [Changelog](.github/CHANGELOG.md)\n\nTo contribute, please check out [Contributing](CONTRIBUTING.md)\nand [Pull Request Template](.github/PULL_REQUEST_TEMPLATE.md)\n\n[Code of Conduct](CODE_OF_CONDUCT.md)\n\n### OpenAI's Data Policy\n\nPlease refer to [OpenAI's data usage policy](https://openai.com/policies/api-data-usage-policies) to stay informed about\nhow your queries and prompts are being handled by them.\n\n### Credit\nThe installation script was inspired by [bash-script-template](https://github.com/ralish/bash-script-template).\nIt replaced the previously used method of `Makefile` and a separate `check_requirements.sh` script.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBrutuski%2Fhal2023-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBrutuski%2Fhal2023-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBrutuski%2Fhal2023-cli/lists"}