{"id":19516859,"url":"https://github.com/diversen/shell-gpt-php","last_synced_at":"2026-04-28T18:03:20.860Z","repository":{"id":65985791,"uuid":"603811457","full_name":"diversen/shell-gpt-php","owner":"diversen","description":"Create shell commands and code using GPT-3","archived":false,"fork":false,"pushed_at":"2024-02-07T22:06:01.000Z","size":490,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-08T12:42:58.486Z","etag":null,"topics":["chatgpt","gpt-3","shell"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diversen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-02-19T16:37:50.000Z","updated_at":"2023-05-05T13:18:34.000Z","dependencies_parsed_at":"2023-06-18T01:16:59.344Z","dependency_job_id":null,"html_url":"https://github.com/diversen/shell-gpt-php","commit_stats":{"total_commits":163,"total_committers":1,"mean_commits":163.0,"dds":0.0,"last_synced_commit":"d0bd2967b01697a456ed78d3434adc03920f2afa"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fshell-gpt-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fshell-gpt-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fshell-gpt-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fshell-gpt-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diversen","download_url":"https://codeload.github.com/diversen/shell-gpt-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240766613,"owners_count":19854119,"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","gpt-3","shell"],"created_at":"2024-11-11T00:00:58.430Z","updated_at":"2026-04-28T18:03:15.840Z","avatar_url":"https://github.com/diversen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shell-gpt-php\n\n    cat README.md | shgpt q \"Summerize the above README in the style of Shakespeare\"\n\nGreeting all, 'tis time to install mine shell-gpt-php. 'Tis a wondrous treasure that can assist with thy questions and commands, thine need only download the latest release, execute thine commands, and away we go! Set thy key for the dilaog, or 'tis time to pipe thy content in and generate shell command with or one line python program. Ask a question, or show token usage from thy last ninety days, 'tis all here! Tis a goodly thing all said, so depart thou now, and enjoy thine shell-gpt-php.\n\n## Installation\n\nDownload the latest release:\n\n```bash\nwget https://www.10kilobyte.com/shgpt/shgpt.phar\nsudo cp -f shgpt.phar /usr/local/bin/shgpt\nsudo chmod +x /usr/local/bin/shgpt\nrm shgpt.phar\n```\n\n* You may also [build it yourself](docs/BUILD.md) \n* Develop [commands](docs/DEVELOP.md)\n\n## Set key\n\nSet (or change) API key\n\n    shgpt key\n\n### Create a dialog\n\n    shgpt dialog\n\nOr:\n\n    shgpt d\n\nSomething like ChatGPT (gpt-3.5-turbo model). Meaning that the answer is extrapolated from the previous questions and answers.\n\n    You: Say \"hello world\"\n    Assistant: Hello world!\n    You: ...\n\nSome sub commands are available in the dialog mode:\n\n    Available commands: \n\n    save  - Save dialog to file\n    exec  - Execute a command and feed the output to the dialog\n    exit  - Exit the dialog\n    comm  - Show all commands\n    clear - Clear the dialog and start over\n\n    Type a message to ChatGPT. Maybe 'hello world!' You may also use above commands.\n\nAll dialogs are auto-saved on exit to the directory `~/.config/shell-gpt-php/data/`\n\n### Generate a shell command: \n\nCommand optimized for shell commands.\n\n    shgpt shell \"Command to search replace in files recursive in current directory\"\n    # -\u003e find . -type f -exec sed -i 's/search/replace/g' {} \\;\n\n    shgpt s \"command to change origin of a git repo\"\n    # -\u003e git remote set-url origin \u003cnew url\u003e\n\nAdd the -e flag to execute the command:\n\n    shgpt s \"Command to search replace in files recursive in current directory\" -e\n    # -\u003e Execute command: find . -type f -exec sed -i 's/search/replace/g' {} \\; ? Sure you want to continue? [Y/n]\n\n### Generating code:\n\nCommand to generate code snippets.\n\n    shgpt code \"Can you make a simple HTML template?\" \u003e index.html\n    more index.html\n\n    shgpt c \"Write a one line hello world python program\"\n    # -\u003e print(\"Hello World!\")\n\n## Ask any question\n\n    shgpt question \"Extract directories from this list of files: $(ls -l)\"\n    # -\u003e bin, src, tests, vendor\n\n    shgpt q \"What is the distance to the sun? Just show me the number.\"\n    # -\u003e 149,597,870.7 kilometers \n\n### STDIN\n\nThe `shell, code, question` commands will accept input from STDIN. STDIN will be added before the prompt. E.g.: \n\n    cat composer.json | shgpt q \"What type of input is this?\"\n    # -\u003e This is a PHP package composer JSON file.\n\n### Set params\n\nSave some model parameters that will override default params.\nBut not parameters that exists on the command line. \n\nE.g. if you set the temperature to 2.0 you will get kind of crazy results\n    \n    shgpt params -h\n\n### Show token usage\n\nLast 24 hours, last 7 days, last 30 days and last 90 days. \n\n    shgpt usage\n\n### Export\n\nExport all dialogs as markdown: \n\n    shgpt export some_dir\n\n## License\n\nMIT © [Dennis Iversen](https://github.com/diversen)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiversen%2Fshell-gpt-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiversen%2Fshell-gpt-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiversen%2Fshell-gpt-php/lists"}