{"id":13620946,"url":"https://github.com/chrisdothtml/gpt-cmd","last_synced_at":"2026-02-02T09:34:04.480Z","repository":{"id":241842296,"uuid":"807999196","full_name":"chrisdothtml/gpt-cmd","owner":"chrisdothtml","description":"Sit back and let ChatGPT run your commands for you.","archived":false,"fork":false,"pushed_at":"2024-06-20T03:51:33.000Z","size":4660,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T08:31:35.019Z","etag":null,"topics":["chatgpt","cli","command-line-tool","llm","task-scripts"],"latest_commit_sha":null,"homepage":"","language":"Go","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/chrisdothtml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2024-05-30T07:25:41.000Z","updated_at":"2024-06-20T03:51:36.000Z","dependencies_parsed_at":"2024-06-11T13:14:45.376Z","dependency_job_id":"ad76e27e-da92-4a0a-ac55-1dca6a5fd2e9","html_url":"https://github.com/chrisdothtml/gpt-cmd","commit_stats":null,"previous_names":["chrisdothtml/gpt-cmd"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/chrisdothtml/gpt-cmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdothtml%2Fgpt-cmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdothtml%2Fgpt-cmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdothtml%2Fgpt-cmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdothtml%2Fgpt-cmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisdothtml","download_url":"https://codeload.github.com/chrisdothtml/gpt-cmd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisdothtml%2Fgpt-cmd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263917262,"owners_count":23529556,"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","command-line-tool","llm","task-scripts"],"created_at":"2024-08-01T21:01:01.032Z","updated_at":"2026-02-02T09:33:59.454Z","avatar_url":"https://github.com/chrisdothtml.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# gpt-cmd\n\n\u003e Sit back and let ChatGPT run your commands for you.\n\n\u003e [!WARNING]\n\u003e While this tool does prompt you before running any command, it's always risky to execute commands directly from a third party. Use responsibly and at your own risk.\n\n```sh\ngpt_cmd \"Install python3 and pip3 and symlink them to python and pip\"\n\ngpt_cmd \"Install SQLite and write a script to verify it's working correctly\"\n\ngpt_cmd \"Install black and generate a simple starter config file for my python project\"\n```\n\n`gpt_cmd` lets ChatGPT iteratively run commands for you to achieve your end goal.\n\nThe way it works is that you provide some end goal (e.g. 'Install python3 and pip3'), the tool will bake-in information about your OS and architecture, and ChatGPT will respond with a list of commands it wants to run. The tool will execute these commands and respond to ChatGPT with the stdout and exit code of each. Once ChatGPT thinks it's done, it'll respond accordingly and the loop will end (and it'll usually provide a bit of context about what it did).\n\nWith this approach, ChatGPT is able to probe your system and try running commands, responding to potential failures as they happen with alternative commands. It's especially handy for tasks that aren't all that complex, but you can't be bothered to google exactly what you need to run.\n\n## Install\n\n\u003e [!WARNING]\n\u003e In light of my other warning above, this install script is pulled directly from my GitHub repo, and is a potential vulnerability if the repo (or GitHub) becomes compromised. Always inspect scripts for shady behavior before running them on your device (even mine: [install.sh](https://raw.githubusercontent.com/chrisdothtml/gpt-cmd/main/install.sh)).\n\n### Linux/MacOS\n\n**NOTE**: the only system requirements are `bash` and either `curl` or `wget`.\n\n```sh\ncurl -s https://raw.githubusercontent.com/chrisdothtml/gpt-cmd/main/install.sh | bash\n\n# or if you prefer wget\nwget -qO- https://raw.githubusercontent.com/chrisdothtml/gpt-cmd/main/install.sh | bash\n```\n\nThe install script will make its best attempt to expose the binary to your `$PATH`, but if that doesn't work, you'll have to manually add it your path (binary install location is `$HOME/.gpt_cmd/bin`).\n\n### Windows\n\nThere's not currently an automated installer for Windows, but you can download the `.exe` file from the [releases page](https://github.com/chrisdothtml/gpt-cmd/releases).\n\n## Use\n\n**NOTE**: before running, you need to create an `~/OPENAI_TOKEN` file and put your token in it.\n\n```sh\ngpt_cmd \u003cgoal\u003e\n\n# see `Env var overrides` section below for full list\nGPT_CMD_MODEL=\"gpt-4-turbo\" gpt_cmd \u003cgoal\u003e\nGPT_CMD_TOKEN_FILE_PATH=\"/my/token/file\" gpt_cmd \u003cgoal\u003e\n\n# print path to the dir containing message logs for your previous runs\ngpt_cmd --get-convos-dir\n```\n\nThe `goal` can be literally anything you can achieve via a terminal (which is a lot). Even if it takes dozens of commands to get there, it'll eventually get there (maybe). You can be as descriptive or vague as you want, and list as many different tasks as you want (e.g. 'Install [some tool] and then write a starter script with some examples of how to use it').\n\n## Env var overrides\n\nEnironment vars that you can provide to change the behavior of the tool.\n\n### `GPT_CMD_MODEL`\n\nOverride the gpt model used by the tool.\n\n**Default**: `gpt-4o`\n\n### `GPT_CMD_TOKEN`\n\nProvide your OpenAI token via this env var instead of storing it in a file.\n\n### `GPT_CMD_TOKEN_FILE_PATH`\n\nOverride the file path the tool gets your OpenAI token from. Alternatively, you can provide the token directly via `GPT_CMD_TOKEN`.\n\n**Default**: `~/OPENAI_TOKEN`\n\n### `GPT_CMD_DANGEROUSLY_SKIP_PROMPTS`\n\nBy default, the tool will prompt you before running each command, as giving an AI unfettered access to run commands on your system is usually a bad idea. However, if you're on a throwaway machine/container and don't care what happens to it, you can disable the prompts via `GPT_CMD_DANGEROUSLY_SKIP_PROMPTS=true`.\n\n## License\n\n[MIT](license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisdothtml%2Fgpt-cmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisdothtml%2Fgpt-cmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisdothtml%2Fgpt-cmd/lists"}