{"id":15432947,"url":"https://github.com/simonw/llm-cmd","last_synced_at":"2025-10-08T06:59:45.751Z","repository":{"id":229841213,"uuid":"777818008","full_name":"simonw/llm-cmd","owner":"simonw","description":"Use LLM to generate and execute commands in your shell","archived":false,"fork":false,"pushed_at":"2025-05-30T05:05:25.000Z","size":16,"stargazers_count":437,"open_issues_count":18,"forks_count":31,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-25T08:23:38.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonw.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":"2024-03-26T15:00:34.000Z","updated_at":"2025-09-20T05:30:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"17f229d1-32aa-4201-9e91-2e5bc6b956fd","html_url":"https://github.com/simonw/llm-cmd","commit_stats":{"total_commits":5,"total_committers":3,"mean_commits":"1.6666666666666667","dds":0.4,"last_synced_commit":"74fb986ee939808362e7a73a71b2e0edadded1bc"},"previous_names":["simonw/llm-cmd"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/simonw/llm-cmd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-cmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-cmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-cmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-cmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonw","download_url":"https://codeload.github.com/simonw/llm-cmd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-cmd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278903040,"owners_count":26065786,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-01T18:29:33.466Z","updated_at":"2025-10-08T06:59:45.746Z","avatar_url":"https://github.com/simonw.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# llm-cmd\n\n[![PyPI](https://img.shields.io/pypi/v/llm-cmd.svg)](https://pypi.org/project/llm-cmd/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/llm-cmd?include_prereleases\u0026label=changelog)](https://github.com/simonw/llm-cmd/releases)\n[![Tests](https://github.com/simonw/llm-cmd/actions/workflows/test.yml/badge.svg)](https://github.com/simonw/llm-cmd/actions/workflows/test.yml)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/llm-cmd/blob/main/LICENSE)\n\nUse LLM to generate and execute commands in your shell\n\nFor background on this project see [llm cmd undo last git commit—a new plugin for LLM](https://simonwillison.net/2024/Mar/26/llm-cmd/)\n\n## Installation\n\nInstall this plugin in the same environment as [LLM](https://llm.datasette.io/).\n```bash\nllm install llm-cmd\n```\n## Usage\n\nThis command could be **very dangerous**. Do not use this unless you are confident you understand what it does and are sure you could spot if it is likely to do something dangerous.\n\nRun `llm cmd` like this:\n\n```bash\nllm cmd undo last git commit\n```\nIt will use your [default model](https://llm.datasette.io/en/stable/setup.html#setting-a-custom-default-model) to generate the corresponding shell command.\n\nThis will then be displayed in your terminal ready for you to edit it, or hit `\u003center\u003e` to execute the prompt.\n\nIf the command doesnt't look right, hit `Ctrl+C` to cancel.\n\n## The system prompt\n\nThis is the prompt used by this tool:\n\n\u003e Return only the command to be executed as a raw string, no string delimiters\nwrapping it, no yapping, no markdown, no fenced code blocks, what you return\nwill be passed to subprocess.check_output() directly.\n\u003e\n\u003e For example, if the user asks: undo last git commit\n\u003e\n\u003e You return only: git reset --soft HEAD~1\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd llm-cmd\npython3 -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\nllm install -e '.[test]'\n```\nTo run the tests:\n```bash\npytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fllm-cmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonw%2Fllm-cmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fllm-cmd/lists"}