{"id":37115445,"url":"https://github.com/dll-as/gitc","last_synced_at":"2026-01-14T13:33:22.092Z","repository":{"id":292224168,"uuid":"980177643","full_name":"dll-as/gitc","owner":"dll-as","description":"High-Performance AI for Lightning-Fast Conventional \u0026 Gitmoji commit messages 🚀","archived":false,"fork":false,"pushed_at":"2025-09-08T08:41:51.000Z","size":2402,"stargazers_count":41,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-01T08:45:14.522Z","etag":null,"topics":["ai-commit","ai-git-commit","commit","git","git-commit","go","golang"],"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/dll-as.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-08T17:35:17.000Z","updated_at":"2025-09-08T08:41:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"06b19b67-ed42-4175-bc48-8363cd1ac8f0","html_url":"https://github.com/dll-as/gitc","commit_stats":null,"previous_names":["rezatg/gitc","dll-as/gitc"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/dll-as/gitc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dll-as%2Fgitc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dll-as%2Fgitc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dll-as%2Fgitc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dll-as%2Fgitc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dll-as","download_url":"https://codeload.github.com/dll-as/gitc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dll-as%2Fgitc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28421246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai-commit","ai-git-commit","commit","git","git-commit","go","golang"],"created_at":"2026-01-14T13:33:20.094Z","updated_at":"2026-01-14T13:33:22.078Z","avatar_url":"https://github.com/dll-as.png","language":"Go","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/dll-as/gitc/blob/master/assets/logo.jpg\" alt=\"gitc AI-Powered Commits\" style=\"clip-path: inset(35px 0 35px 0);margin: 0; padding: 0px, border-radius: 5px;box-shadow: 0 4px 8px rgba(0,0,0,0.2);\"\u003e\n\u003c/div\u003e\n\n# ✨ gitc - AI-Powered Git Commit Messages\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/dll-as/gitc)](https://pkg.go.dev/github.com/dll-as/gitc)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/dll-as/gitc?logo=go)](go.mod)\n[![Sourcegraph](https://sourcegraph.com/github.com/dll-as/gitc/-/badge.svg)](https://sourcegraph.com/github.com/dll-as/gitc?badge)\n[![Discussions](https://img.shields.io/github/discussions/dll-as/gitc?color=58a6ff\u0026label=Discussions\u0026logo=github)](https://github.com/dll-as/gitc/discussions)\n[![Downloads](https://img.shields.io/github/downloads/dll-as/gitc/total?color=blue)](https://github.com/dll-as/gitc/releases)\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/dll-as/gitc)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#-installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#-features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#-configuration\"\u003eConfiguration\u003c/a\u003e •\n  \u003ca href=\"#-basic-usage\"\u003eUsage\u003c/a\u003e •\n  \u003ca href=\"#-full-options\"\u003eFull Options\u003c/a\u003e •\n  \u003ca href=\"#-ai-providers\"\u003eAI Providers\u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n\u003e `gitc` is a fast, lightweight CLI tool that uses AI to generate clear, consistent, and standards-compliant commit messages — directly from your Git diffs. With built-in support for [Conventional Commits](https://www.conventionalcommits.org), [Gitmoji](https://gitmoji.dev), and fully customizable rules, `gitc` helps you and your team write better commits, faster\n\n# 🚀 Features\n`gitc` is a lightweight CLI tool that leverages AI to craft clear, standards-compliant Git commit messages from your diffs. Supporting [Conventional Commits](https://www.conventionalcommits.org), [Gitmoji](https://gitmoji.dev), and custom rules, it saves time and boosts commit quality for you and your team.\n\n- 🧠 **AI-Powered Commits**\n  - Generates context-aware commit messages using OpenAI, Grok (xAI), or DeepSeek.\n  - Supports multiple languages (e.g., English, Persian, Russian) for global teams.\n  - Extensible for future AI providers like Gemini.\n\n- 📝 **Standards \u0026 Customization**\n  - Follows [Conventional Commits](https://www.conventionalcommits.org) (`feat`, `fix`, `docs`, etc.) for semantic versioning.\n  - Adds [Gitmoji](https://gitmoji.dev) emojis for visual flair (e.g., ✨, 🚑).\n  - Customizable prefixes (e.g., JIRA IDs) via JSON.\n\n- 🔧 **Git Integration**\n  - Processes staged Git diffs, ignoring irrelevant files (`node_modules/*`, `*.lock`).\n  - Configurable file exclusions for focused commits.\n\n- ⚙️ **Flexible Configuration**\n  - Supports CLI flags, environment variables, and `~/.gitc/config.json`.\n  - Includes proxy support, adjustable timeouts, and redirect limits.\n\n- ⚡️ **Performance \u0026 Reliability**\n  - Fast JSON parsing with [sonic](https://github.com/bytedance/sonic) and HTTP requests with [fasthttp](https://github.com/valyala/fasthttp).\n  - Robust error handling for reliable operation.\n\n- 🧪 Debug \u0026 Dry-Run\n  - Preview prompts and configs without API calls — perfect for tuning without burning tokens.\n\n## 📦 Installation\n### Prerequisites:\n  - Go: Version **1.18** or higher (required for building from source).\n  - Git: Required for retrieving staged changes.\n  - OpenAI API Key: Required for AI-powered commit message generation. Set it via the `AI_API_KEY` environment variable or in the config file.\n\n#### Quick Install:\n  ```bash\n  go install github.com/dll-as/gitc@latest\n  ```\n\n### Manual Install\n  1. Download binary from [releases](https://github.com/dll-as/gitc/releases)\n  2. `chmod +x gitc`\n  3. Move to `/usr/local/bin`\n\n### Verify Installation\n  After installation, verify the tool is installed correctly and check its version:\n  ```bash\n  gitc --version\n  ```\n\n# 💻 Basic Usage\n```bash\n# 1. Stage your changes\ngit add . # or gitc -a\n\n# 2. Generate perfect commit message\ngitc\n\n# Stage specific files and generate\ngitc bot.py\ngitc src/utils.go main.go\n\n# Pro Tip: Add emojis and specify language\ngitc --emoji --lang fa\n\n# Custom commit type\ngitc --commit-type fix\n\n# Debug mode: See what prompt would be sent without API cost\ngitc --dry-run\n```\n\n## Environment Variables\n```bash\nexport OPENAI_API_KEY=\"sk-your-key-here\"\nexport GITC_LANGUAGE=\"fa\"\nexport GITC_MODEL=\"gpt-4\"\n```\n\n# ⚙️ Configuration\nConfig File (`~/.gitc/config.json`) :\n```json\n{\n  \"provider\": \"openai\",\n  \"max_length\": 200,\n  \"temperature\": 0.7,\n  \"proxy\": \"\",\n  \"language\": \"en\",\n  \"timeout\": 10,\n  \"commit_type\": \"\",\n  \"custom-convention\": \"\",\n  \"use_gitmoji\": false,\n  \"max_redirects\": 5,\n  \"open_ai\": {\n    \"api_key\": \"sk-your-key-here\",\n    \"model\": \"gpt-4o-mini\",\n    \"url\": \"https://api.openai.com/v1/chat/completions\"\n  }\n}\n```\n\n### Update Configuration\n```bash\ngitc config --api-key \"sk-your-key-here\" --model \"gpt-4o-mini\" --lang en\n```\n\n\n# 📚 Full Options\nThe following CLI flags are available for the `ai-commit` command and its `config` subcommand. All flags can also be set via environment variables or the `~/.gitc/config.json` file.\n\n| Flag | Alias | Description | Default | Environment Variable | Example |\n|------|-------|-------------|---------|----------------------|---------|\n| `--all` | `-a` | Stage all changes before generating commit message (equivalent to `git add .`) | `false` | `GITC_STAGE_ALL` | `-all` or `-a`\n| `--provider` | - | AI provider to use (e.g., `openai`, `anthropic`) | `openai` | `AI_PROVIDER` | `--provider openai` |\n| `--url` | `-u` | Custom API URL for the AI provider | Provider-specific | `GITC_API_URL` | `--url https://api.x.ai/v1/chat/completions`\n| `--model` | - | OpenAI model for commit message generation | `gpt-4o-mini` | - | `--model gpt-4o` |\n| `--lang` | - | Language for commit messages (e.g., `en`, `fa`, `ru`) | `en` | `GITC_LANGUAGE` | `--lang fa` |\n| `--timeout` | - | Request timeout in seconds | `10` | - | `--timeout 15` |\n| `--max-length` | - | Maximum length of the commit message | `200` | - | `--max-length 150` |\n| `--temperature` | - | Control AI creativity (0.0 = fully deterministic, 1.0 = very creative) | `0.7` | - | `--temperature 0.8`\n| `--api-key` | `-k` | API key for the AI provider | - | `AI_API_KEY` | `--api-key sk-xxx` |\n| `--proxy` | `-p` | Proxy URL for API requests | - | `GITC_PROXY` | `--proxy http://proxy.example.com:8080` |\n| `--commit-type` | `-t` | Commit type for Conventional Commits (e.g., `feat`, `fix`) | - | `GITC_COMMIT_TYPE` | `--commit-type feat` |\n| `--scope`      | `-s` | Add scope to the commit type (e.g. `auth`, `ui`, `db`) — works with or without `--commit-type` | - | - | `--scope auth` or `-s ui` |\n| `--custom-convention` | `-C` | Custom commit message convention (JSON format) | - | `GITC_CUSTOM_CONVENTION` | `--custom-convention '{\"prefix\": \"JIRA-123\"}'` |\n| `--emoji` | `-g` | Add Gitmoji to the commit message | `false` | `GITC_GITMOJI` | `--emoji` |\n| `--no-emoji` | - | Disables Gitmoji in commit messages (overrides `--emoji` and config file) | `false` | - | `--no-emoji`\n| `--dry-run` | -d | Preview the exact prompt and config sent to AI without making an API request (great for debugging prompts and avoiding costs) | `false` | `GITC_DRY_RUN` | --dry-run or -d\n| `--max-redirects` | `-r` | Maximum number of HTTP redirects | `5` | `GITC_MAX_REDIRECTS` | `--max-redirects 10` |\n| `--config` | `-c` | Path to the configuration file | `~/.gitc/config.json` | `GITC_CONFIG_PATH` | `--config ./my-config.json` |\n\n\u003e [!NOTE]\n\u003e - Flags for the `config` subcommand are similar but exclude defaults, as they override the config file.\n\u003e - **Flags** \u003e **Environment Variables** \u003e **Config File** — This is the order of precedence when multiple settings are provided.\n\u003e - The `--custom-convention` flag expects a JSON string with a `prefix` field (e.g., `{\"prefix\": \"JIRA-123\"}`).\n\u003e - The `--version` flag displays the current tool version (e.g., `0.3.0`) and can be used to verify installation.\n\u003e - The `--all` flag (alias `-a`) stages all changes in the working directory before generating the commit message, streamlining the workflow. For example, `gitc -a --emoji` stages all changes and generates a commit message with Gitmoji.\n\u003e - Environment variables take precedence over config file settings but are overridden by CLI flags.\n\u003e - You can reset all configuration values to their defaults by using gitc config `gitc reset-config`.\n\n\n## 🤖 AI Providers\n`gitc` is designed to be AI-provider agnostic. While it currently supports OpenAI out of the box, support for additional providers is on the roadmap to ensure flexibility and future-proofing.\n\n| Provider | Supported Models | Required Configuration | Status |\n| --- | --- | --- | --- |\n| **OpenAI** | `gpt-4o`, `gpt-4o-mini`, `gpt-3.5-turbo` | `api_key`, `model`, `url` (optional) | ✅ Supported (default) |\n| **Grok (xAI)** | grok-3 (experimental) | `api_key`, `model`, `url` | 🧪 Experimental Support |\n| **DeepSeek** | deepseek-rag (experimental) | `api_key`, `model`, `url` | 🧪 Experimental Support |\n| **Gemini (Google)** | Coming Soon | - | 🔜 Planned |\n| **Others** | - | - | 🧪 Under consideration |\n\u003e ℹ️ We're actively working on supporting multiple AI backends to give you more control, flexibility, and performance. Have a provider you'd like to see? [Open a discussion](https://github.com/dll-as/gitc/discussions)!\n\n## 🤝 Contributing\n\nWe welcome contributions! Please check out the [contributing guide](CONTRIBUTING.md) before making a PR.\n\n## ⭐️ Star History\n[![Star History Chart](https://api.star-history.com/svg?repos=dll-as/gitc\u0026type=Date)](https://www.star-history.com/#dll-as/gitc\u0026Date)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdll-as%2Fgitc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdll-as%2Fgitc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdll-as%2Fgitc/lists"}