{"id":24423084,"url":"https://github.com/zcaceres/magic-diff","last_synced_at":"2025-09-02T11:37:40.330Z","repository":{"id":272234100,"uuid":"915913619","full_name":"zcaceres/magic-diff","owner":"zcaceres","description":"Never write a commit message ever again","archived":false,"fork":false,"pushed_at":"2025-02-25T18:46:25.000Z","size":1475,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T23:13:21.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zcaceres.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":"2025-01-13T04:58:01.000Z","updated_at":"2025-02-26T18:23:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"d2872144-e5c3-40e1-b152-9f5b753bb4fd","html_url":"https://github.com/zcaceres/magic-diff","commit_stats":null,"previous_names":["zcaceres/magic-diff"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fmagic-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fmagic-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fmagic-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zcaceres%2Fmagic-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zcaceres","download_url":"https://codeload.github.com/zcaceres/magic-diff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528876,"owners_count":21445518,"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":[],"created_at":"2025-01-20T10:16:29.650Z","updated_at":"2025-04-23T23:13:26.677Z","avatar_url":"https://github.com/zcaceres.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# magic_diff\n\n![magic_diff logo](logo.jpg)\n\nmagic_diff is a command-line tool that automates your git commit messages. You stage changes, it writes your commit.\n\n## Features\n\n- Automatically generates a git commit message based on staged changes using an LLM of your choice\n- Copies the generated message to your clipboard for easy pasting\n- Supports multiple clipboard tools (pbcopy, xclip, clip)\n\n## Prerequisites\n\n- Git\n- [llm](https://github.com/simonw/llm) - A command-line interface for interacting with large language models\n\n## Installation\n\n1. Clone this repository:\n   ```\n   git clone https://github.com/zcaceres/magic-diff.git\n   cd magic-diff\n   ```\n\n2. Move the contents of magic_diff.sh into your PATH (.zprofile, .bashrc etc.)\n   ```\n   chmod +x magic_diff.sh\n   ```\n\n## Setup\n\n1. Install the `llm` tool if you haven't already:\n   ```\n   brew install llm\n   ```\n\n2. (Optional) Install plugins for other model providers such as....\n    ```\n    llm install llm-claude-3\n    llm install llm-gemini\n    ```\n\n2. Set up your OpenAI/Anthropic/other provider API key:\n   ```\n   llm keys set openai\n   ```\n\n3. (Recommended) Set a cheap but effective default model:\n   ```\n   llm models default gpt-4o-mini\n   ```\n\n## Usage\n\n1. Stage your changes in git as usual:\n   ```\n   git add .\n   ```\n\n2. Run magic-diff:\n   ```\n   magic_diff\n   ```\n\n3. The script will generate a commit message based on your staged changes and copy it to your clipboard.\n\n4. Paste the generated message into your git commit command or GUI.\n\n## Customization\n\nYou can modify the prompt used to generate the commit message by editing the `llm` command in the `magic_diff()` function of the script.\n\n## Troubleshooting\n\n- If you encounter issues with clipboard functionality, ensure you have one of the supported clipboard tools installed (pbcopy, xclip, or clip).\n- If the `llm` command is not found, make sure it's installed and in your PATH.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n## Credits\n\nThanks Chong-U Lim for inspiration for the environment-neutral copy functionality.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcaceres%2Fmagic-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzcaceres%2Fmagic-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzcaceres%2Fmagic-diff/lists"}