{"id":49588071,"url":"https://github.com/glemiu6/komit","last_synced_at":"2026-05-23T05:20:14.253Z","repository":{"id":355468709,"uuid":"1228016029","full_name":"glemiu6/komit","owner":"glemiu6","description":"AI-powered git commit message generator using local LLMs","archived":false,"fork":false,"pushed_at":"2026-05-07T02:59:01.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-08T04:39:00.124Z","etag":null,"topics":["ai","cli","commit","developer-tools","git","linux","llm","macos","ollama","windows"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/komit/","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/glemiu6.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":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-03T13:34:45.000Z","updated_at":"2026-05-07T21:59:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/glemiu6/komit","commit_stats":null,"previous_names":["glemiu6/komit"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/glemiu6/komit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glemiu6%2Fkomit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glemiu6%2Fkomit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glemiu6%2Fkomit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glemiu6%2Fkomit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glemiu6","download_url":"https://codeload.github.com/glemiu6/komit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glemiu6%2Fkomit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":["ai","cli","commit","developer-tools","git","linux","llm","macos","ollama","windows"],"created_at":"2026-05-03T23:11:32.392Z","updated_at":"2026-05-23T05:20:14.240Z","avatar_url":"https://github.com/glemiu6.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 komit\n\nAI-powered git commit message generator using local LLMs via Ollama. No API keys, no internet required — runs completely locally and privately.\n\n---\n\n[![PyPI](https://img.shields.io/pypi/v/komit)](https://pypi.org/project/komit)\n[![Python](https://img.shields.io/pypi/pyversions/komit)](https://pypi.org/project/komit)\n[![License](https://img.shields.io/github/license/glemiu6/komit)](https://github.com/glemiu6/komit/blob/master/LICENSE)\n[![Downloads](https://static.pepy.tech/badge/komit/month)](https://pepy.tech/project/komit)\n[![CI](https://github.com/glemiu6/komit/actions/workflows/ci.yaml/badge.svg)](https://github.com/glemiu6/komit/actions)\n\n---\n\n## Features\n\n- 🧠 **Local LLM** — uses Ollama, no API keys needed\n- 🌿 **Branch-Aware Context** — Infers conventional types and scopes directly from your active git branch\n- 📝 **Multiple commit styles** — conventional, simple, detailed\n- 🔄 **Regenerate** — not happy? generate a new message instantly\n- ✏️ **Edit before commit** — open your editor to tweak the message safely (`git commit -m ... -e`)\n- ⚙️ **CLI flags** — control style, model, and more from the command line\n- 📁 **Config file** — persist your preferences with `komit init`\n- 🌍 **Universal** — works via pip, binary, or shell script\n- 🪟 **Cross-platform** — Linux, macOS, Windows\n- ⚡ **Fast** — runs on your machine, no network calls to external APIs\n- 🔒 **Ollama validation** — checks if Ollama is running and model exists before generating\n- 🔁 **Smart updates** — detects pip vs binary install and updates accordingly\n\n---\n\n## Requirements\n\n- [Ollama](https://ollama.com) installed and running\n- A local model pulled (e.g. `ollama pull qwen2.5:7b`)\n\n---\n\n## Recommended Models\n\n| Model | Size | Best for |\n|-------|------|----------|\n| `qwen2.5:7b` | 4.7GB | Best quality |\n| `mistral:7b` | 4.1GB | Good balance |\n| `llama3.2:3b` | 2.0GB | Fastest |\n\n```bash\nollama pull qwen2.5:7b\n\n```\n\n---\n\n## Installation\n\n### Option 1 — One line install (Linux/macOS, no Python required)\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/glemiu6/komit/master/scripts/install.sh | bash\n```\n\n### Option 2 — Windows PowerShell\n\n```powershell\nirm https://raw.githubusercontent.com/glemiu6/komit/master/scripts/install.ps1 | iex\n```\n\n### Option 3 — pip\n\n```bash\npip install komit\n```\n\n### Option 4 — pipx (recommended for CLI tools)\n\n```bash\npipx install komit\n```\n\n### Option 5 — Download binary\n\nDownload the binary for your platform from [GitHub Releases](https://www.google.com/search?q=https://github.com/glemiu6/komit/releases/latest):\n\n| Platform | Binary |\n| --- | --- |\n| Linux x86_64 | `komit-linux-x86_64` |\n| macOS Apple Silicon | `komit-macos-arm64` |\n| Windows | `komit-windows-x86_64.exe` |\n\n\u003e Intel Mac users: use `pip install komit` instead.\n\n```bash\n# Linux/macOS\nchmod +x komit-*\nsudo mv komit-* /usr/local/bin/komit\n```\n\n---\n\n## Setup\n\n### Git alias (recommended)\n\n```bash\ngit config --global alias.ai '!komit'\n```\n\nNow you can use `git ai` as a shortcut.\n\n### Shell completion\n\n```bash\n# bash\necho 'eval \"$(register-python-argcomplete komit)\"' \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n\n# zsh\necho 'eval \"$(register-python-argcomplete komit)\"' \u003e\u003e ~/.zshrc\nsource ~/.zshrc\n```\n\n---\n\n## Usage\n\n```bash\n# stage your changes\ngit add .\n\n# generate commit message\nkomit\n\n# or via git alias\ngit ai\n\n# or via shell script\n./scripts/commit.sh\n```\n\n### Subcommands \u0026 Maintenance\n\nInstead of creating a commit message, you can manage the application lifetime using these distinct actions:\n\n```bash\nkomit init       # Interactively build or overwrite your global config.toml file\nkomit update     # Safely checks for and installs down the latest tracking version\nkomit uninstall  # Complete system removal (clears global aliases, configs, variables, and packaging)\n\n```\n\n### CLI flags\n\n```bash\nkomit [--style STYLE] [--model MODEL] [--ollama-url URL] [--max_diff N] [--timeout SEC] [--include_branch_name BOOL] [--dry-run]\n\n```\n\n| Flag | Short | Options / Type | Default | Description |\n| --- | --- | --- | --- | --- |\n| `--style` | `-s` | `conventional`, `simple`, `detailed` | `None` (uses config) | Choose the output template formatting engine |\n| `--model` | `-m` | String (any Ollama model tag) | `None` (uses config) | Target local model signature |\n| `--ollama-url` | `-u` | Valid URL | `None` (uses config) | Set alternative Ollama API endpoint host |\n| `--max_diff` | — | Integer | `None` (uses config) | Maximum diff character truncation length |\n| `--timeout` | — | Integer | `None` (uses config) | Maximum generation time frame allowance in seconds |\n| `--include_branch_name` | `-ib` | `True` / `False` | `None` (uses config) | Enable context mapping and suffixing with current branch name |\n| `--dry-run` | `-dr` | Flag (store_true) | `False` | Halts execution gracefully at preview step without creating a commit |\n| `--config` | — | Path String | `None` | Read execution parameters from a non-standard configuration layout |\n\n### Examples\n\n```bash\n# Force simple formatting mode execution\nkomit --style simple\n\n# Use smaller parameter scale weights to save resources\nkomit --model llama3.2:3b\n\n# Track structural tags across distinct remote targets\nkomit --ollama-url [http://192.168.1.10:11434](http://192.168.1.10:11434)\n\n# Match branch contexts strictly to evaluate output properties\nkomit -ib True --dry-run\n\n# Run against explicit local parameters\nkomit --config ~/my-config.toml\n\n```\n\n---\n\n## Interactive Experience\n\nWhen invoked, `komit` structures your staged workspace and interactive paths using rich terminal layouts:\n\n```text\n┬──────────────────────── Staged files (3) ────────────────────────┬\n│  • src/auth.py                                                   │\n│  • tests/test_auth.py                                            │\n│  • README.md                                                     │\n┴──────────────────────────────────────────────────────────────────┴\nBranch name: feature/auth-tokens\nModel: qwen2.5:7b · Style: conventional\n\n⠋ Generating commit message...\n\n┬──────────────────── Suggested commit message ────────────────────┬\n│ feat(auth): add JWT authentication token engine [feature/auth-t… │\n┴──────────────────────────────────────────────────────────────────┴\n\n» Choose an action: (y)es, (n)o, (e)dit, (r)egenerate [y]: \n\n```\n\n### Response Path Mappings\n\n| Option | Key | Behavior |\n| --- | --- | --- |\n| **Yes** | `y` | Instantly runs standard non-interactive `git commit -m` mapping directly to the output. |\n| **No** | `n` | Terminates routine execution without impacting staged files. |\n| **Edit** | `e` | Executes `git commit -m ... -e`, loading the generated message straight into your local environment editor ($EDITOR) for explicit manual overrides. |\n| **Regenerate** | `r` | Restrikes the Ollama Chat API endpoint using structural variance to provide a fresh alternative message option. |\n\n---\n\n## Branch Name Parsing (Smart Inference)\n\nWhen `--include_branch_name` is enabled, `komit` automatically reads your current Git branch name to guess the correct commit type and scope before asking the AI to write the message. \n\nIf your branch follows common naming patterns like `type/scope-description` or `type-scope`, it extracts the details instantly:\n\n*   **`feat/auth-login`** $\\rightarrow$ Type: `feat`, Scope: `auth`\n*   **`fix/ui_button`** $\\rightarrow$ Type: `fix`, Scope: `ui_button`\n\n### Supported Types\nThe parser actively detects these standard conventional commit types: \n`feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `test`, `ci`, and `perf`.\n\n---\n\n## Configuration Schema\n\nRun `komit init` to automatically provision a configuration folder or overwrite file defaults. The values are securely maintained globally under `~/.config/komit/config.toml` (or your platform configuration equivalent via `platformdirs` standards):\n\n```toml\nmodel = \"qwen2.5:7b\"\nstyle = \"conventional\"\nollama_url = \"http://localhost:11434\"\nmax_diff_length = 4000\ntimeout = 60\ninclude_branch_name = true\n\n```\n\n*Note: Runtime arguments passed via your terminal interface explicitly supersede structural rules defined inside your persistent configurations.*\n\n---\n\n## Commit Style Outputs\n\n### Conventional (Default Pattern)\n\n```text\nfeat(auth): add user authentication [feature/login]\nfix(api): resolve null pointer in response pipeline [bugfix/cors]\n\n```\n\n### Simple\n\n```text\nAdd user authentication [feature/login]\nFix null pointer in response pipeline [bugfix/cors]\n\n```\n\n### Detailed\n\n```text\nfeat(auth): add user authentication [feature/login]\n\n- Add JWT token generation pipeline\n- Implement password security layers using bcrypt primitives\n- Append rotation verification routes\n\n```\n\n---\n\n## Maintenance\n\n```bash\n# Upgrading tracking states\nkomit update\n\n# Completely remove all system components\nkomit uninstall\n\n```\n\n---\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feat/my-cool-feature`)\n3. Commit your changes (`komit` 😉)\n4. Push to the branch (`git push origin feat/my-cool-feature`)\n5. Open a Pull Request\n\n---\n\n## License\n\n[Apache License 2.0]()\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglemiu6%2Fkomit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglemiu6%2Fkomit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglemiu6%2Fkomit/lists"}