{"id":13433804,"url":"https://github.com/shorwood/gptsh","last_synced_at":"2026-03-09T17:16:48.699Z","repository":{"id":40304040,"uuid":"324684786","full_name":"shorwood/gptsh","owner":"shorwood","description":"GPT.sh is a CLI tool built with NodeJs and powered by Open AI's GPT-3. It's main purpose is to translate natural language questions and requests into shell commands.","archived":false,"fork":false,"pushed_at":"2023-03-05T18:27:35.000Z","size":1389,"stargazers_count":119,"open_issues_count":9,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-03-14T22:23:42.276Z","etag":null,"topics":["ai","bash","cli","cmdxyz","cross-platform","gitpod","gpt3","natural-language-processing","nlsh","nodejs","openai","powershell"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/shorwood.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}},"created_at":"2020-12-27T04:16:56.000Z","updated_at":"2024-02-08T11:20:31.000Z","dependencies_parsed_at":"2024-01-14T09:58:17.256Z","dependency_job_id":"ba7b4fdd-0f4f-4320-84ec-4daf185aa185","html_url":"https://github.com/shorwood/gptsh","commit_stats":{"total_commits":107,"total_committers":4,"mean_commits":26.75,"dds":0.5327102803738317,"last_synced_commit":"7dab245edf1d37282a9c49938fd74eff3dd9e488"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shorwood%2Fgptsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shorwood%2Fgptsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shorwood%2Fgptsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shorwood%2Fgptsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shorwood","download_url":"https://codeload.github.com/shorwood/gptsh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230527881,"owners_count":18240052,"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","bash","cli","cmdxyz","cross-platform","gitpod","gpt3","natural-language-processing","nlsh","nodejs","openai","powershell"],"created_at":"2024-07-31T02:01:36.626Z","updated_at":"2026-03-09T17:16:48.662Z","avatar_url":"https://github.com/shorwood.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","CLIs"],"sub_categories":[],"readme":"# gptsh - Hello, Dave.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/shorwood/gptsh\"\u003e\n    \u003cimg src=\"https://github.com/shorwood/gptsh/raw/master/assets/gptsh.png\" alt=\"gptsh\" width=\"836\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n  \n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/shorwood/gptsh/blob/master/LICENSE\"\u003e\u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/shorwood/gptsh?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/gptsh\"\u003e\u003cimg alt=\"NPM Package Version\" src=\"https://img.shields.io/npm/v/gptsh?style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/shorwood/gptsh\"\u003e\u003cimg alt=\"Docker Image Version\" src=\"https://img.shields.io/docker/v/shorwood/gptsh?label=docker\u0026style=flat-square\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://gitpod.io/#https://github.com/shorwood/gptsh\"\u003e\u003cimg src=\"https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod\u0026style=flat-square\" alt=\"Gitpod ready-to-code\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**gptsh** is a cross platform CLI tool built with NodeJS and powered by [Open AI's GPT-3](https://openai.com/). It's main purpose is to translate natural language questions and requests into shell commands. Heavily inspired by projects such as [nlsh](https://vimeo.com/427943407/98fe5258a7) and [cmdxyz](https://cmd.xyz/), it can easily be installed and used in conjunction with your classic shell environment.\n\nThis tool is not meant as a complete replacement for all of you shell commands. It's role is to integrate into your standard shell workflow to help you make generic task which commands you dont know by heart. For example, when compressing or uncompressing a files, using new frameworks, searching files on your system and much more...\n\n## • Demo\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/shorwood/gptsh\"\u003e\n    \u003cimg src=\"https://github.com/shorwood/gptsh/raw/master/assets/gptsh.gif\" alt=\"gptsh\" width=\"836\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## • Installation\n\nUse the package manager NPM or Yarn to install gptsh globally on your system.\n```bash\nnpm install --global gptsh\n```\n```bash\nyarn global add gptsh\n```\n\nOr you can run the `shorwood/gptsh` docker image like so.\n```bash\ndocker run --rm -e OPENAI_SECRET_KEY shorwood/gptsh \u003cinput\u003e\n```\n```bash\ndocker run --rm shorwood/gptsh \u003cinput\u003e -s \u003cYOUR_SECRET_KEY\u003e\n```\n\nAnd while you're at it, alias that command for quick use\n```bash\n$ alias gptsh='docker run --rm -e OPENAI_SECRET_KEY shorwood/gptsh'\n$ gptsh Reset Nginx\nsudo service nginx restart\n```\n\n## • Getting started\nTo use this tool, you will need to set [OpenAI API key](https://beta.openai.com/) either as an environment variable.\n```bash\nOPENAI_SECRET_KEY=\u003cYOUR_SECRET_KEY\u003e\nOPENAI_ENGINE_ID=davinci\n```\n\nAs a option while executing the command.\n```bash\ngptsh \u003cinput\u003e --secret \u003cYOUR_SECRET_KEY\u003e\n```\n\nOr in the `~/.gptshrc` config file placed in your home directory.\n```ini\nsecret=sk-XckwVRipQyM9nr1M8jVGGBUvDGIqwVmsbcrznkwz\nengine=davinci\nplatform=linux\n```\n\n\n## • Usage\n\n\n```\nUsage: gptsh \u003cinput\u003e [options]\n\nOptions:\n      --version      Show version number                               [boolean]\n  -s, --secret       OpenAI API key for authentication                  [string]\n  -e, --engine       ID of the engine to use                            [string]\n  -t, --tokens       Maximum number of tokens to consume [number] [default: 100]\n      --temperature  Higher values means the model will take more risks\n                                                         [number] [default: 0.0]\n  -p, --platform     Platform of the command to output                  [string]\n  -n                 Number of completions to generate                  [number]\n      --help         Show help                                         [boolean]\n```\n\n## • Examples\n```bash\n$ gptsh install node 12 repository\ncurl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -\n```\n\n```bash\n$ gptsh add yarn bin folder to path on zsh\necho 'export PATH=\"$HOME/.yarn/bin:$PATH\"' \u003e\u003e ~/.zshrc\n```\n\n```bash\n$ gptsh List all files of this directory | bash\nLICENSE  data  node_modules  package.json  src  yarn.lock\n```\n\n```bash\n$ gptsh Install the lodash package using yarn --secret \u003cYOUR_SECRET_KEY\u003e\nyarn add lodash\n```\n\n```bash\n$ gptsh Delete the root directory --engine ada\nrm -rf /\n```\n\n```bash\n$ gptsh Add remote from github with name shorwood/gptsh\ngit remote add shorwood https://github.com/shorwood/gptsh.git\n```\n\nOh, and it works for other platforms too.\n```powershell\nPS C:\\WINDOWS\\system32\u003e gptsh Add a new user --platform win32\nAdd-ADUser -Name \"username\" -SamAccountName username -AccountPassword (Read-Host -AsSecureString \"Password\") -Enabled $true -ChangePasswordAtLogon $false\n```\n\n```powershell\n$ gptsh Add a new user --platform aix\nmkuser username\n```\n\n## • Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## • License\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshorwood%2Fgptsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshorwood%2Fgptsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshorwood%2Fgptsh/lists"}