{"slug": "i-built-a-cli-tool-that-writes-better-git-commits-than-i-do", "title": "I Built a CLI Tool That Writes Better Git Commits Than I Do", "summary": "A developer built git-copilot, a CLI tool that generates conventional commit messages by analyzing staged diffs using pure Python standard library with no AI or API calls. The tool automatically detects commit types based on file patterns, infers scope from directory names, and identifies breaking changes from migration files or keywords.", "body_md": "Have you ever stared at a terminal after `git commit`\n\n, trying to remember what you changed?\n\nI have. Every single day.\n\nThen I'd type \"fixed stuff\" or \"update\" and move on. Six months later, every `git log`\n\nwas a graveyard of useless messages.\n\nSo I built **git-copilot**.\n\n``` bash\n$ git add .\n$ git-copilot gen\n✨ feat(api): add user routes and controller\n3 file(s), +124/-15 lines\n```\n\nReads your staged diff, analyzes the files, and generates a conventional commit message. About 5 seconds.\n\nNo AI. No API calls. No internet. Pure Python stdlib with smart heuristics.\n\n| Change | Auto-detects |\n|---|---|\n| src/*.py, *.js | feat |\n| _test.py, spec.js | test |\n| README.md, docs/* | docs |\n| Dockerfile, .github/ | build or ci |\n| *.css, *.scss | style |\n\nScope is inferred from directory names - api/, ui/, db/, auth/, config/. Breaking changes detected from migration files or BREAKING CHANGE keywords.\n\n```\npip install git-copilot\n```\n\nOr from GitHub:\n\n```\ngit clone https://github.com/zhirenhun-stack/git-copilot\ncd git-copilot && pip install -e .\ngit-copilot gen\ngit-copilot gen --type fix\ngit-copilot config\ngit-copilot init\n```\n\nThe free version is fully functional and open source. The Pro Pack includes:\n\nI got tired of writing \"wip\" for every commit. Now I run `git-copilot gen | git commit -F -`\n\nand get back to coding. Clean commits, every time.\n\nRepo: [https://github.com/zhirenhun-stack/git-copilot](https://github.com/zhirenhun-stack/git-copilot)\n\nPro Pack: [https://zhirenhun.gumroad.com/l/git-copilot-pro](https://zhirenhun.gumroad.com/l/git-copilot-pro)", "url": "https://wpnews.pro/news/i-built-a-cli-tool-that-writes-better-git-commits-than-i-do", "canonical_source": "https://dev.to/z_z_c01afd7cf4c3764a2c73d/i-built-a-cli-tool-that-writes-better-git-commits-than-i-do-82f", "published_at": "2026-05-26 13:33:47+00:00", "updated_at": "2026-05-26 14:04:20.738926+00:00", "lang": "en", "topics": ["ai-tools", "ai-products"], "entities": ["git-copilot", "zhirenhun-stack"], "alternates": {"html": "https://wpnews.pro/news/i-built-a-cli-tool-that-writes-better-git-commits-than-i-do", "markdown": "https://wpnews.pro/news/i-built-a-cli-tool-that-writes-better-git-commits-than-i-do.md", "text": "https://wpnews.pro/news/i-built-a-cli-tool-that-writes-better-git-commits-than-i-do.txt", "jsonld": "https://wpnews.pro/news/i-built-a-cli-tool-that-writes-better-git-commits-than-i-do.jsonld"}}