{"id":28815076,"url":"https://github.com/madflow/kommit","last_synced_at":"2026-04-14T06:32:39.012Z","repository":{"id":297685133,"uuid":"997509879","full_name":"madflow/kommit","owner":"madflow","description":"An Agentic Git Commit Assistant - git kommit --yolo","archived":false,"fork":false,"pushed_at":"2026-03-19T18:29:19.000Z","size":5702,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-20T08:49:52.200Z","etag":null,"topics":["agentic-ai","agents","ai","cli","fun","git","ollama"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/madflow.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-06-06T16:45:37.000Z","updated_at":"2026-03-19T18:29:12.000Z","dependencies_parsed_at":"2025-06-27T12:24:19.986Z","dependency_job_id":"de648bc3-7199-4897-9181-4f8e569529c2","html_url":"https://github.com/madflow/kommit","commit_stats":null,"previous_names":["madflow/kommit"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/madflow/kommit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madflow%2Fkommit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madflow%2Fkommit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madflow%2Fkommit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madflow%2Fkommit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madflow","download_url":"https://codeload.github.com/madflow/kommit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madflow%2Fkommit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31785554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: 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":["agentic-ai","agents","ai","cli","fun","git","ollama"],"created_at":"2025-06-18T16:03:28.128Z","updated_at":"2026-04-14T06:32:38.988Z","avatar_url":"https://github.com/madflow.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kommit\n\n\u003e Git commits for the rest of us\n\n`kommit` is a command-line tool that uses the power of AI to generate git commit messages for you. By analyzing the changes in your code, it creates descriptive and relevant commit messages, saving you time and effort. It is designed to work with Ollama to generate commit messages and is highly configurable via a configuration file. You can either accept the generated message as is, edit it to your liking, or use the \"YOLO\" mode to automatically commit and push your changes without confirmation.\n\n## Table of Contents\n\n- [Requirements](#requirements)\n- [Installation](#installation)\n  - [macOS](#macos)\n  - [Docker](#docker)\n    - [Git Configuration in Docker](#git-configuration-in-docker)\n- [Configuration](#configuration)\n  - [Configuration Options](#configuration-options)\n- [Usage](#usage)\n  - [Basic Usage](#basic-usage)\n  - [How It Works](#how-it-works)\n  - [Commit Message Editing](#commit-message-editing)\n  - [Git Integration](#git-integration)\n\n## Requirements\n\n- [Ollama](https://ollama.ai/) - Required for generating commit messages. Make sure Ollama is installed and running before using Kommit.\n  - Download and install from: https://ollama.ai/download\n  - Start the Ollama server: `ollama serve`\n\n## Installation\n\n### macOS\n\n```bash\nbrew install --no-quarantine madflow/kommit/kommit\n```\n\n### Docker\n\n```bash\n# Build the image\ndocker build -t madflow/kommit .\n\n# Basic usage with Git configuration\ndocker run -it --rm \\\n  -v $PWD:/workdir \\\n  -e GIT_USER_NAME=\"Your Name\" \\\n  -e GIT_USER_EMAIL=\"your.email@example.com\" \\\n  madflow/kommit [command] [args...]\n\n# With Ollama running on host (Linux/macOS)\ndocker run -it --rm \\\n  -v $PWD:/workdir \\\n  --network=host \\\n  -e OLLAMA_HOST=host.docker.internal \\\n  -e GIT_USER_NAME=\"Your Name\" \\\n  -e GIT_USER_EMAIL=\"your.email@example.com\" \\\n  madflow/kommit [command] [args...]\n\n# With explicit Ollama host (Windows/Linux/macOS)\ndocker run -it --rm \\\n  -v $PWD:/workdir \\\n  -e OLLAMA_HOST=host.docker.internal \\\n  -e GIT_USER_NAME=\"Your Name\" \\\n  -e GIT_USER_EMAIL=\"your.email@example.com\" \\\n  --add-host=host.docker.internal:host-gateway \\\n  madflow/kommit [command] [args...]\n\n# Using automatic Git config from host\ndocker run -it --rm \\\n  -v $PWD:/workdir \\\n  --network=host \\\n  -e GIT_USER_NAME=\"$(git config --get user.name)\" \\\n  -e GIT_USER_EMAIL=\"$(git config --get user.email)\" \\\n  -e OLLAMA_HOST=host.docker.internal \\\n  --add-host=host.docker.internal:host-gateway \\\n  madflow/kommit\n\n# Using environment file with automatic Git config\necho \"GIT_USER_NAME=$(git config --get user.name)\" \u003e .kommit.env\necho \"GIT_USER_EMAIL=$(git config --get user.email)\" \u003e\u003e .kommit.env\necho \"OLLAMA_HOST=host.docker.internal\" \u003e\u003e .kommit.env\n\ndocker run -it --rm \\\n  -v $PWD:/workdir \\\n  --env-file .kommit.env \\\n  --add-host=host.docker.internal:host-gateway \\\n  madflow/kommit\n```\n\n#### Git Configuration in Docker\n\nWhen running Kommit in a Docker container, you can provide Git user configuration in several ways:\n\n1. **Automatic (Recommended)**:\n\n   ```bash\n   -e GIT_USER_NAME=\"$(git config --get user.name)\" \\\n   -e GIT_USER_EMAIL=\"$(git config --get user.email)\"\n   ```\n\n2. **Manual**:\n\n   ```bash\n   -e GIT_USER_NAME=\"Your Name\" \\\n   -e GIT_USER_EMAIL=\"your.email@example.com\"\n   ```\n\n3. **Via .env file**:\n   ```bash\n   echo \"GIT_USER_NAME=$(git config --get user.name)\" \u003e .kommit.env\n   echo \"GIT_USER_EMAIL=$(git config --get user.email)\" \u003e\u003e .kommit.env\n   docker run --env-file .kommit.env ...\n   ```\n\nIf no Git configuration is provided, it will use these defaults:\n\n- `GIT_USER_NAME`: \"Kommit User\"\n- `GIT_USER_EMAIL`: \"kommit@example.com\"\n\n## Usage\n\n### Basic Usage\n\n```bash\n# Run kommit in the current git repository\nkommit\n\n# Stage all changes before committing\nkommit --add\n# or use the short flag\nkommit -a\n\n# Run with a specific config file\nkommit --config /path/to/config.yaml\n\n# YOLO mode: Automatically stage, commit, and push changes (no confirmation)\nkommit --yolo\n# or use the short flag\nkommit -y\n\n# Create a pull request after committing (requires GitHub repository and gh CLI)\nkommit --pr\n\n# Combine options: YOLO mode + create pull request\nkommit --yolo --pr\n```\n\n### Options\n\n#### `branch`\n\nThis subcommand generates a new Git branch name based on your current staged changes and creates the branch. It uses the configured Ollama model to analyze the diff and suggest a relevant branch name, ensuring it's no more than 50 characters long. This is useful for quickly creating feature or bugfix branches that reflect the work you're about to commit.\n\nUsage:\n\n```bash\nkommit branch\n```\n\n#### `--add` or `-a`\n\nThis option automatically stages all changes in your Git repository before generating a commit message. It's equivalent to running `git add .` before `kommit`. Use this when you want to quickly commit all modified and new files without manually staging them.\n\n#### `--yolo` or `-y`\n\nThis option automatically stages all changes, commits with the generated message, and pushes to the remote repository without any confirmation prompts. It's a \"fire-and-forget\" mode for when you trust the process completely.\n\n#### `--pr`\n\nThis option creates a pull request after committing changes. The behavior depends on your current branch:\n\n- **On the main branch**: When you're on the origin's main branch (automatically detected), the --pr flag has no effect and does nothing\n- **On a feature branch**: Creates a pull request against the origin main branch using both local and remote changes for AI generation\n\nThe AI analyzes both:\n\n- **Local changes**: Your currently staged changes (what will be committed)\n- **Remote changes**: All changes in your branch since it diverged from the origin main branch\n\nThis option requires:\n\n- A GitHub repository\n- GitHub CLI (`gh`) installed and authenticated\n- Remote tracking set up (`git remote set-head origin -a` if needed)\n\nWhen used with `--yolo`, it will automatically commit, push, and create a pull request in one command. The AI-generated pull request title and description follow configurable rules and can be customized in your configuration file.\n\n### Configuration\n\nKommit uses a YAML configuration file to customize its behavior. The configuration file is automatically loaded from one of these locations (in order of priority):\n\n1. `$PWD/.kommit.yaml`\n2. `$GIT_DIR/.konfig.yaml` (if inside a git repository)\n3. `$XDG_CONFIG_HOME/kommit/config.yaml`\n4. `$HOME/.config/kommit/config.yaml`\n5. `$HOME/.kommit.yaml`\n\n\u003e **Note**: The `$GIT_DIR` location is particularly useful for repository-specific configurations that should be shared with all contributors.\n\n#### Configuration Options\n\n```yaml\n# Ollama API configuration\nollama:\n  # URL of the Ollama API server (default: http://localhost:11434/api/generate)\n  server_url: \"http://localhost:11434/api/generate\"\n\n  # Model to use for generating commit messages (default: \"qwen2.5-coder:7b\")\n  model: \"qwen2.5-coder:7b\"\n\n# Rules for generating commit messages\n# This is a free-form text that guides the AI in generating commit messages\nrules: |\n  - Start with an emoji that represents the changes (🐛, ✨, 🚀, etc.)\n  - Write the first line as if a pirate explaining the changes\n  - Include what was changed and why\n  - Be creative and have fun with it!\n\n# Rules for generating pull request descriptions\npr_rules: |\n  - Create a concise summary for a pull request in the format \"## Summary\" followed by 1-3 bullet points\n  - Each bullet point should highlight a key change or improvement made in this pull request\n  - Focus on the value and impact of the changes, not just what files were modified\n  - Use simple, direct language that explains what was accomplished\n\n# Rules for generating pull request titles\npr_title_rules: |\n  - Create a concise and descriptive pull request title\n  - Maximum length: 80 characters (aim for under 80 characters)\n  - Use imperative mood (\"Add feature\" not \"Added feature\" or \"Adds feature\")\n  - Start with a verb when possible (Add, Fix, Update, Remove, etc.)\n  - Be specific about what was changed or accomplished\n```\n\n### Basic Usage\n\n```bash\n# Run kommit in the current git repository\nkommit\n\n# Stage all changes before committing\nkommit --add\n# or use the short flag\nkommit -a\n\n# Run with a specific config file\nkommit --config /path/to/config.yaml\n\n# YOLO mode: Automatically stage, commit, and push changes (no confirmation)\nkommit --yolo\n# or use the short flag\nkommit -y\n```\n\n### Options\n\n#### `--add` or `-a`\n\nThis option automatically stages all changes in your Git repository before generating a commit message. It's equivalent to running `git add .` before `kommit`. Use this when you want to quickly commit all modified and new files without manually staging them.\n\n#### `--yolo` or `-y`\n\nThis option automatically stages all changes, commits with the generated message, and pushes to the remote repository without any confirmation prompts. It's a \"fire-and-forget\" mode for when you trust the process completely.\n\n#### `--pr`\n\nThis option creates a pull request after committing changes. The behavior depends on your current branch:\n\n- **On the main branch**: When you're on the origin's main branch (automatically detected), the --pr flag has no effect and does nothing\n- **On a feature branch**: Creates a pull request against the origin main branch using both local and remote changes for AI generation\n\nThe AI analyzes both:\n\n- **Local changes**: Your currently staged changes (what will be committed)\n- **Remote changes**: All changes in your branch since it diverged from the origin main branch\n\nThis option requires:\n\n- A GitHub repository\n- GitHub CLI (`gh`) installed and authenticated\n- Remote tracking set up (`git remote set-head origin -a` if needed)\n\nWhen used with `--yolo`, it will automatically commit, push, and create a pull request in one command. The AI-generated pull request title and description follow configurable rules and can be customized in your configuration file.\n\n### How It Works\n\nWhen you run `kommit`, it will:\n\n- Check if you're in a git repository\n- Check if there is a valid config file in one of the supported locations\n- Use the defaults if no config file is found\n- Generate a commit message using the configured Ollama model\n- Show a preview of the changes that will be committed\n- Ask for confirmation before committing with the following options:\n  - `y` or `yes`: Accept the generated message and commit\n  - `e` or `edit`: Open your default editor to modify the commit message\n  - `n` or `no` (or press Enter): Cancel the commit\n\n### Commit Message Editing\n\nWhen you choose to edit the commit message (`e` or `edit`):\n\n1. Your default text editor will open with the generated commit message\n   - The editor is determined by the `$EDITOR` environment variable, or defaults to `vi`\n2. Make your changes to the commit message and save the file\n3. After closing the editor, you'll see the updated message and be prompted again\n4. You can continue editing as many times as needed until you're satisfied\n5. Choose `y` to commit with the current message or `n` to cancel\n\n### Git Integration\n\nFor convenience, you can create a git alias:\n\n```bash\ngit config --global alias.kommit '!kommit'\n```\n\nThen you can use it as:\n\n```bash\ngit kommit\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadflow%2Fkommit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadflow%2Fkommit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadflow%2Fkommit/lists"}