{"id":18031784,"url":"https://github.com/undertone0809/gcop","last_synced_at":"2025-05-16T18:03:25.947Z","repository":{"id":245706122,"uuid":"817805991","full_name":"Undertone0809/gcop","owner":"Undertone0809","description":"🚀 AI-Powered Git Commit Assistant | Automate Commit Messages, Streamline Git Workflow. Help you write better git commit message.","archived":false,"fork":false,"pushed_at":"2025-04-05T11:50:51.000Z","size":2555,"stargazers_count":172,"open_issues_count":43,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T16:53:15.586Z","etag":null,"topics":["commit-message","git","llm","openai"],"latest_commit_sha":null,"homepage":"https://gcop.zeeland.top","language":"Python","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/Undertone0809.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-20T13:30:19.000Z","updated_at":"2025-04-12T05:55:05.000Z","dependencies_parsed_at":"2024-09-08T23:20:41.736Z","dependency_job_id":"93c6997c-c450-4ffb-90c0-621805f879e3","html_url":"https://github.com/Undertone0809/gcop","commit_stats":{"total_commits":76,"total_committers":2,"mean_commits":38.0,"dds":"0.013157894736842146","last_synced_commit":"611dfea1c9fdab5bd4fd352f479948008531a4c0"},"previous_names":["undertone0809/gcop"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Undertone0809%2Fgcop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Undertone0809%2Fgcop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Undertone0809%2Fgcop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Undertone0809%2Fgcop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Undertone0809","download_url":"https://codeload.github.com/Undertone0809/gcop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254582901,"owners_count":22095518,"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":["commit-message","git","llm","openai"],"created_at":"2024-10-30T10:10:52.052Z","updated_at":"2025-05-16T18:03:25.903Z","avatar_url":"https://github.com/Undertone0809.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n   \u003cimg src=\"./docs/public/banner.png\" alt=\"GCOP Banner\" style=\"border-radius: 15px;\"\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Python Version](https://img.shields.io/pypi/pyversions/gcop.svg)](https://pypi.org/project/gcop/)\n[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/Undertone0809/gcop/pulls?utf8=%E2%9C%93\u0026q=is%3Apr%20author%3Aapp%2Fdependabot)\n[![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/Undertone0809/gcop/releases)\n[![License](https://img.shields.io/github/license/Undertone0809/gcop)](https://github.com/Undertone0809/gcop/blob/main/LICENSE)\n\n\u003ca href=\"https://t.me/zeeland0809\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Telegram-join%20chat-2CA5E0?logo=telegram\u0026logoColor=white\" alt=\"chat on Telegram\"\u003e\n\u003c/a\u003e\n\n\u003c/div\u003e\n\nGCOP (Git Copilot) - Your AI-powered Git assistant that transforms messy commits into meaningful stories. It automates commit message generation, enhances your Git workflow, and makes version control a breeze with 20+ smart commands.\n\n## 🚀 Key Features\n\n1. **🤖 Intelligent Commit Crafting**\n   - Let AI analyze your changes and generate contextually perfect commit messages\n   - Learn from your project's commit history to match your team's style\n\n2. **🎨 Highly Customizable Experience**\n   - Design your own commit templates to match project requirements\n   - Fine-tune commit message style with custom prompts\n   - Configure project-specific settings for consistent team standards\n\n3. **📚 Smart Learning Capabilities**\n   - Automatically learn from your repository's commit history\n   - Adapt to your team's commit conventions over time\n   - Improve message quality through continuous learning\n\n4. **⚡ Seamless Developer Experience**\n   - Supercharged with 20+ intuitive Git shortcuts and commands\n   - Smart aliases that make complex Git operations a breeze\n   - Integrate with your favorite AI models (OpenAI, Anthropic, etc.)\n   - Zero-config integration with your existing Git workflow\n\n## Video Demo\n\nThis video shows how to use gcop to generate a commit message. See the [documentation](https://gcop.zeeland.top/)\n\n[![Gcop is your git AI copilot](https://zeeland-bucket.oss-cn-beijing.aliyuncs.com/images/20240624003422.png)](https://www.youtube.com/watch?v=j7qKI_TdhXs \"Gcop is your git AI copilot\")\n\n## 🛠️ Getting Started\n\nWe recommend you to read the [Quick Start Guide](https://gcop.zeeland.top/) in detail.\n\n### What You'll Need\n\n- Python 3.8 or newer\n- Git installed on your system\n- An API key for your preferred LLM (e.g., OpenAI, Anthropic)\n\n### Installation\n\n1. Install GCOP with pip:\n\n   ```\n   pip install gcop\n   ```\n\n2. Initialize GCOP:\n\n   ```\n   gcop init\n   ```\n\n\u003e This command sets up GCOP and adds its aliases to your Git configuration.\n\n3. Configure your AI model:\n\n   ```\n   git gconfig\n   ```\n\n   This opens the configuration file. Edit it to include your AI provider details:\n\n   ```yaml\n   model:\n     model_name: provider/name, eg openai/gpt-4o\n     api_key: your_api_key\n   ```\n\nThen gcop will generate a `config.yaml`, then gcop will open the `config.yaml`\nfile in the default editor, and you can config your language model. See how to\nconfig your model [here](https://gcop.zeeland.top/other/how-to-config-model.html):\n\n\u003e `config.yaml` store path:\n\u003e\n\u003e - Windows: `%USERPROFILE%\\.zeeland\\gcop\\config.yaml`\n\u003e - Linux: `~/.zeeland/gcop/config.yaml`\n\u003e - MacOS: `~/.zeeland/gcop/config.yaml`\n\n1. Verify the installation:\n\n   ```\n   git ghelp\n   ```\n\n\n   You should see output similar to:\n\n   ```\n   gcop is your local git command copilot\n   Version: 1.0.0\n   GitHub: https://github.com/Undertone0809/gcop\n\n   Usage: git [OPTIONS] COMMAND\n\n   Commands:\n     git p          Push changes to remote repository\n     git pf         Force push changes to remote repository\n     git undo       Undo last commit, keep changes\n     git ghelp      Show this help message\n     git gconfig    Open config file in default editor\n     git gcommit    Generate AI commit message and commit changes\n     git ac         Add all changes and commit with AI message\n     git c          Shorthand for 'git gcommit'\n   ```\n\n## 💡 Basic Usage\n\n### Generating AI Commit Messages\n\nAfter making changes to your project:\n\n1. Stage your changes:\n\n   ```\n   git add .\n   ```\n\n2. Generate and apply an AI commit message:\n\n   ```\n   git c\n   ```\n\n   Example output:\n\n```\n[On Ready] Generating commit message...\n\n[Thought] The changes include adding a new file for VSCode settings and updating the .gitignore to include the new settings file. These changes are related to\ndevelopment environment configuration and do not affect the application's functionality.\n\n[Generated commit message]\nchore: update vscode settings and gitignore\n\n- Add .vscode/settings.json with YAML schema configuration\n- Update .gitignore to include .vscode/settings.json\n- Add .vscode/extensions.json with recommended extensions\n\nThese changes improve the development environment by ensuring proper YAML schema validation and managing VSCode settings and extensions.\n\n? Do you want to commit the changes with this message? (Use arrow keys)\n » yes\n   retry\n   retry by feedback\n   exit\n```\n\n3. Choose the most appropriate message using arrow keys and press Enter.\n\n### Other Useful Commands\n\n- `git ac`: Add all changes and commit with an AI-generated message\n\n   ```\n   git ac\n   ```\n\n   Output:\n\n   ```\n   Changes added. Generating commit message...\n   ? Select a commit message to commit (Use arrow keys)\n    » feat: Add new user profile page\n      fix: Correct CSS styling issues on mobile devices\n      docs: Update API documentation for v2.0\n      refactor: Optimize database queries for better performance\n      retry\n   ```\n\n- `git undo`: Undo the last commit while keeping changes staged\n\n   ```\n   git undo\n   ```\n\n   Output:\n\n   ```\n   HEAD is now at a1b2c3d Previous commit message\n   Changes from the last commit are now staged.\n   ```\n\n- `git p`: Push to the current branch\n\n   ```\n   git p\n   ```\n\n   Output:\n\n   ```\n   Enumerating objects: 5, done.\n   Counting objects: 100% (5/5), done.\n   Delta compression using up to 8 threads\n   Compressing objects: 100% (3/3), done.\n   Writing objects: 100% (3/3), 328 bytes | 328.00 KiB/s, done.\n   Total 3 (delta 2), reused 0 (delta 0), pack-reused 0\n   To https://github.com/username/repo.git\n      a1b2c3d..e4f5g6h  main -\u003e main\n   ```\n\n- `git pf`: Force push to the current branch (use with caution)\n- `git gconfig`: Open the GCOP configuration file for adjustments\n\n## 🔧 Configuration\n\nTo modify your AI model settings:\n\n1. Open the config file:\n\n   ```\n   git gconfig\n   ```\n\n2. Edit the `config.yaml` file:\n\n   ```yaml\n   model:\n     model_name: provider/name, eg openai/gpt-4o\n     api_key: your_api_key\n   ```\n\n3. Save and close the file.\n\n## 📚 Learn More\n\n- [Detailed Documentation](https://gcop.zeeland.top/)\n- [Contribution Guidelines](CONTRIBUTING.md)\n- [Changelog](https://github.com/Undertone0809/gcop/releases)\n\n### Makefile usage\n\n[`Makefile`](https://github.com/Undertone0809/gcop/blob/main/Makefile)\ncontains a lot of\nfunctions for faster development.\n\n\u003cdetails\u003e\n\u003csummary\u003eInstall all dependencies and pre-commit hooks\u003c/summary\u003e\n\u003cp\u003e\n\n```bash\nmake install\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCodestyle and type checks\u003c/summary\u003e\n\u003cp\u003e\n\nAutomatic formatting uses `ruff`.\n\n```bash\nmake polish-codestyle\n\n# or use synonym\nmake formatting\n```\n\nCodestyle checks only, without rewriting files:\n\n```bash\nmake check-codestyle\n```\n\n\u003e Note: `check-codestyle` uses `ruff` and `darglint` library\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCode security\u003c/summary\u003e\n\u003cp\u003e\n\n\u003e If this command is not selected during installation, it cannnot be used.\n\n```bash\nmake check-safety\n```\n\nThis command launches `Poetry` integrity checks as well as identifies security issues\nwith `Safety` and `Bandit`.\n\n```bash\nmake check-safety\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eTests with coverage badges\u003c/summary\u003e\n\u003cp\u003e\n\nRun `pytest`\n\n```bash\nmake test\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eAll linters\u003c/summary\u003e\n\u003cp\u003e\n\nOf course there is a command to run all linters in one:\n\n```bash\nmake lint\n```\n\nthe same as:\n\n```bash\nmake check-codestyle \u0026\u0026 make test \u0026\u0026 make check-safety\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDocker\u003c/summary\u003e\n\u003cp\u003e\n\n```bash\nmake docker-build\n```\n\nwhich is equivalent to:\n\n```bash\nmake docker-build VERSION=latest\n```\n\nRemove docker image with\n\n```bash\nmake docker-remove\n```\n\nMore\ninformation [about docker](https://github.com/Undertone0809/python-package-template/tree/main/%7B%7B%20cookiecutter.project_name%20%7D%7D/docker).\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCleanup\u003c/summary\u003e\n\u003cp\u003e\nDelete pycache files\n\n```bash\nmake pycache-remove\n```\n\nRemove package build\n\n```bash\nmake build-remove\n```\n\nDelete .DS_STORE files\n\n```bash\nmake dsstore-remove\n```\n\nRemove .mypycache\n\n```bash\nmake mypycache-remove\n```\n\nOr to remove all above run:\n\n```bash\nmake cleanup\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## 📦 Techs\n\n- [Promptulate: Large language model automation and Autonomous Language Agents development framework](https://github.com/Undertone0809/promptulate)\n- [P3G: Python Packages Project Generator](https://github.com/Undertone0809/P3G)\n\n## 🛡 License\n\n[![License](https://img.shields.io/github/license/Undertone0809/gcop)](https://github.com/Undertone0809/gcop/blob/main/LICENSE)\n\nThis project is licensed under the terms of the `MIT` license.\nSee [LICENSE](https://github.com/Undertone0809/gcop/blob/main/LICENSE) for more details.\n\n## 🤝 Support\n\nFor more information, please\ncontact: [zeeland4work@gmail.com](mailto:zeeland4work@gmail.com)\n\nSee anything changelog, describe the [telegram channel](https://t.me/zeeland0809)\n\n## Credits [![🚀 Your next Python package needs a bleeding-edge project structure.](https://img.shields.io/badge/P3G-%F0%9F%9A%80-brightgreen)](https://github.com/Undertone0809/python-package-template)\n\nThis project was generated with [P3G](https://github.com/Undertone0809/P3G)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fundertone0809%2Fgcop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fundertone0809%2Fgcop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fundertone0809%2Fgcop/lists"}