{"id":27813848,"url":"https://github.com/tarampampam/describe-commit","last_synced_at":"2025-05-01T12:05:40.988Z","repository":{"id":277200614,"uuid":"930462118","full_name":"tarampampam/describe-commit","owner":"tarampampam","description":"🪇 CLI tool that leverages AI to generate commit messages based on changes made in a Git repository","archived":false,"fork":false,"pushed_at":"2025-04-01T13:53:50.000Z","size":120,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-01T12:04:49.179Z","etag":null,"topics":["ai","commit","developer-tools","gemini","generative-ai","git","openai"],"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/tarampampam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-10T17:11:06.000Z","updated_at":"2025-04-26T19:19:36.000Z","dependencies_parsed_at":"2025-02-12T17:48:13.865Z","dependency_job_id":"12829c6d-ff1d-4e89-9909-fe40c5617f01","html_url":"https://github.com/tarampampam/describe-commit","commit_stats":null,"previous_names":["tarampampam/describe-commit"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarampampam%2Fdescribe-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarampampam%2Fdescribe-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarampampam%2Fdescribe-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarampampam%2Fdescribe-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarampampam","download_url":"https://codeload.github.com/tarampampam/describe-commit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251871487,"owners_count":21657467,"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":["ai","commit","developer-tools","gemini","generative-ai","git","openai"],"created_at":"2025-05-01T12:04:56.879Z","updated_at":"2025-05-01T12:05:40.967Z","avatar_url":"https://github.com/tarampampam.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/tarampampam/describe-commit#readme\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://socialify.git.ci/tarampampam/describe-commit/image?description=1\u0026font=Raleway\u0026forks=1\u0026issues=1\u0026logo=https%3A%2F%2Fhabrastorage.org%2Fwebt%2F6v%2F7-%2Fil%2F6v7-iljmr7fo1ogj3uz0kvnkhaa.png\u0026owner=1\u0026pulls=1\u0026pattern=Solid\u0026stargazers=1\u0026theme=Dark\"\u003e\n      \u003cimg align=\"center\" src=\"https://socialify.git.ci/tarampampam/describe-commit/image?description=1\u0026font=Raleway\u0026forks=1\u0026issues=1\u0026logo=https%3A%2F%2Fhabrastorage.org%2Fwebt%2F6v%2F7-%2Fil%2F6v7-iljmr7fo1ogj3uz0kvnkhaa.png\u0026owner=1\u0026pulls=1\u0026pattern=Solid\u0026stargazers=1\u0026theme=Light\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Describe Commit\n\n`describe-commit` is a CLI tool that leverages AI to generate commit messages based on changes made in a Git repository.\nCurrently, it supports the following AI providers:\n\n- [OpenAI ChatGPT](https://openai.com/chatgpt/overview/)\n- [Google Gemini](https://deepmind.google/technologies/gemini/)\n- [OpenRouter](https://openrouter.ai/)\n- [Anthropic](https://www.anthropic.com/) (Claude/Sonnet)\n\nIt also allows users to select the desired model for content generating.\n\n## 🦾 tl;dr\n\n|       Turn this       |      Into this      |\n|:---------------------:|:-------------------:|\n| ![Before][before_img] | ![After][after_img] |\n\n[before_img]:https://habrastorage.org/webt/ni/z-/d1/niz-d1zfmbf4pc9kpdbvtapvljy.png\n[after_img]:https://habrastorage.org/webt/wo/8t/cd/wo8tcdgdm80fb6ayacgpse3_8hu.png\n\nWithout any manual effort (there's no time to write commit messages, lazy developers unite)!\n\n## 🔥 Features list\n\n- Generates meaningful commit messages using AI\n- Supports different AI providers\n- Can generate short commit messages (subject line only)\n- Optionally includes emojis (🐛✨📝🚀✅♻️⬆️🔧🌐💡) in commit messages\n- Takes the commit history into account for better context\n- Runs as a standalone binary (only installed `git` is required)\n- Available for **Linux**, **macOS**, **Windows**, and as a **Docker image**\n\n\u003e [!NOTE]\n\u003e Under the hood, this app does two things before returning the generated commit message:\n\u003e\n\u003e - Retrieves the `git diff` (and `git log` optionally) for the specified directory\n\u003e - Sends this diff to the AI provider with the provided special prompt\n\u003e\n\u003e Please keep in mind that when working with proprietary code, some parts of the code will be sent to the AI\n\u003e provider. You should ensure that this is permitted by your company's policy. Additionally, make sure that\n\u003e the AI provider does not store your data (or stores it securely).\n\u003e\n\u003e The author of this tool is not responsible for any data leaks or security issues.\n\n## 🧩 Installation\n\n### 📦 Debian/Ubuntu-based (.deb) systems\n\nExecute the following commands in order:\n\n```shell\n# setup the repository automatically\ncurl -1sLf https://dl.cloudsmith.io/public/tarampampam/describe-commit/setup.deb.sh | sudo -E bash\n\n# install the package\nsudo apt install describe-commit\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eUninstalling\u003c/summary\u003e\n\n```shell\nsudo apt remove describe-commit\nrm /etc/apt/sources.list.d/tarampampam-describe-commit.list\n```\n\n\u003c/details\u003e\n\n### 📦 RedHat (.rpm) systems\n\n```shell\n# setup the repository automatically\ncurl -1sLf https://dl.cloudsmith.io/public/tarampampam/describe-commit/setup.rpm.sh | sudo -E bash\n\n# install the package\nsudo dnf install describe-commit # RedHat, CentOS, etc.\nsudo yum install describe-commit # Fedora, etc.\nsudo zypper install describe-commit # OpenSUSE, etc.\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eUninstalling\u003c/summary\u003e\n\n```shell\n# RedHat, CentOS, Fedora, etc.\nsudo dnf remove describe-commit\nrm /etc/yum.repos.d/tarampampam-describe-commit.repo\nrm /etc/yum.repos.d/tarampampam-describe-commit-source.repo\n\n# OpenSUSE, etc.\nsudo zypper remove describe-commit\nzypper rr tarampampam-describe-commit\nzypper rr tarampampam-describe-commit-source\n```\n\n\u003c/details\u003e\n\n### 📦 Alpine Linux\n\n```shell\n# bash is required for the setup script\nsudo apk add --no-cache bash\n\n# setup the repository automatically\ncurl -1sLf https://dl.cloudsmith.io/public/tarampampam/describe-commit/setup.alpine.sh | sudo -E bash\n\n# install the package\nsudo apk add describe-commit\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eUninstalling\u003c/summary\u003e\n\n```shell\nsudo apk del describe-commit\n$EDITOR /etc/apk/repositories # remove the line with the repository\n```\n\n\u003c/details\u003e\n\n### 📦 AUR (Arch Linux)\n\nThere are three packages available in the AUR:\n\n- Build from source: [describe-commit](https://aur.archlinux.org/packages/describe-commit)\n- Precompiled: [describe-commit-bin](https://aur.archlinux.org/packages/describe-commit-bin)\n- Unstable: [describe-commit-git](https://aur.archlinux.org/packages/describe-commit-git)\n\n```shell\npamac build describe-commit\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eUninstalling\u003c/summary\u003e\n\n```shell\npacman -Rs describe-commit\n```\n\n\u003c/details\u003e\n\n### 📦 Binary (Linux, macOS, Windows)\n\nDownload the latest binary for your architecture/OS from the [releases page][link_releases]. For example, to install\nthe latest version to the `/usr/local/bin` directory on an **amd64** system (e.g., Debian, Ubuntu), you can run:\n\n```shell\n# download and install the binary\ncurl -SsL \\\n  https://github.com/tarampampam/describe-commit/releases/latest/download/describe-commit-linux-amd64.gz | \\\n  gunzip -c | sudo tee /usr/local/bin/describe-commit \u003e /dev/null\n\n# make the binary executable\nsudo chmod +x /usr/local/bin/describe-commit\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eUninstalling\u003c/summary\u003e\n\n```shell\nsudo rm /usr/local/bin/describe-commit\n```\n\n\u003c/details\u003e\n\n\u003e [!TIP]\n\u003e Each release includes binaries for **linux**, **darwin** (macOS) and **windows** (`amd64` and `arm64` architectures).\n\u003e You can download the binary for your system from the [releases page][link_releases] (section `Assets`). And - yes,\n\u003e all what you need is just download and run single binary file.\n\n[link_releases]:https://github.com/tarampampam/describe-commit/releases\n\n### 📦 Docker image\n\nAlso, you can use the Docker image:\n\n| Registry                               | Image                                 |\n|----------------------------------------|---------------------------------------|\n| [GitHub Container Registry][link_ghcr] | `ghcr.io/tarampampam/describe-commit` |\n\n\u003e [!NOTE]\n\u003e It’s recommended to avoid using the `latest` tag, as **major** upgrades may include breaking changes.\n\u003e Instead, use specific tags in `:X.Y.Z` or only `:X` format for version consistency.\n\n[link_ghcr]:https://github.com/tarampampam/describe-commit/pkgs/container/describe-commit\n\n\u003cdetails\u003e\n  \u003csummary\u003eExample\u003c/summary\u003e\n\n\u003e ```shell\n\u003e docker run --rm \\\n\u003e   -u \"$(id -u):$(id -g)\" \\                                # to avoid problems with permissions\n\u003e   -v \"$HOME/.config/describe-commit.yml:/config.yml:ro\" \\ # use your configuration file\n\u003e   -v \"$(pwd):/rootfs:ro\" \\                                # mount current directory as read-only\n\u003e   -e \"CONFIG_FILE=/config.yml\" \\                          # specify the configuration file path\n\u003e   -w \"/rootfs\" \\                                          # set the working directory\n\u003e     ghcr.io/tarampampam/describe-commit ...\n\u003e ```\n\n\u003c/details\u003e\n\n## ⚙ Configuration\n\nYou can configure `describe-commit` using a YAML file. Refer to [this example](describe-commit.example.yml) for\navailable options.\n\nYou can specify the configuration file's location using the `--config-file` option. By default, however, the\ntool searches for the file in the user's configuration directory:\n\n- **Linux**: `~/.configs/describe-commit.yml`\n- **Windows**: `%APPDATA%\\describe-commit.yml`\n- **macOS**: `~/Library/Application Support/describe-commit.yml`\n\n### Configuration Options Priority\n\nConfiguration options are applied in the following order, from highest to lowest priority:\n\n1. Command-line options (e.g., `--ai-provider`, `--openai-api-key`, etc.)\n2. Environment variables (e.g., `GEMINI_API_KEY`, `OPENAI_MODEL_NAME`, etc.)\n3. A configuration file in the working directory or any parent directory, up to the root (the file can be\n   named `.describe-commit.yml` or `describe-commit.yml`)\n4. A configuration file in the user's configuration directory (e.g., `~/.configs/describe-commit.yml` for Linux)\n\nThis means you can store API tokens and other default settings in the global user's configuration file and override\nthem with command-line options or a configuration file in the working directory when needed (e.g., enabling emojis\nonly for specific projects, disable commits history analysis, etc.).\n\n## 🚀 Use Cases (usage examples)\n\n#### ☝ Commit the changes using an AI-generated commit message in a single command\n\n```shell\ngit commit -m \"$(describe-commit)\"\n```\n\n\u003e A Git repository must be initialized in the specified directory, and `git` must be installed on your system.\n\u003e Additionally, ensure that changes are staged (`git add -A`) before running the tool.\n\n#### ☝ Integration with the git\n\nAdd this alias to your `~/.gitconfig` file:\n\n```ini\n[alias]\n  # Stage all changes and commit them with a generated message\n  wip = \"!f() { git add -Av \u0026\u0026 git commit -m \\\"$(describe-commit)\\\"; }; f\"\n```\n\nNow, in **any** repository, you can simply run:\n\n```shell\ngit wip\n```\n\nAnd voilà! All changes will be staged and committed with a generated message.\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003e☝ Get a Commit Message for a Specific Directory\u003c/strong\u003e\u003c/summary\u003e\n\n```shell\ndescribe-commit /path/to/repo\n```\n\nExample output:\n\n```markdown\ndocs: Add initial README with project description\n\nThis commit introduces the initial README file, providing a comprehensive\noverview of the `describe-commit` project. It includes a project description,\nfeatures list, installation instructions, and usage examples.\n\n- Provides a clear introduction to the project\n- Guides users through installation and basic usage\n- Highlights key features and functionalities\n```\n\nYou are able to save the output to a file:\n\n```shell\ndescribe-commit /path/to/repo \u003e /path/to/commit-message.txt\n```\n\nOr do wherever you want with it.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003e☝ Switch Between AI Providers\u003c/strong\u003e\u003c/summary\u003e\n\nGenerate a commit message using OpenAI:\n\n```shell\ndescribe-commit --ai openai --openai-api-key \"your-openai-api-key\"\n```\n\nWill output something like this:\n\n```markdown\ndocs(README): Update project description and installation instructions\n\nEnhanced the README file to provide a clearer project overview and detailed installation instructions. The\nchanges aim to improve user understanding and accessibility of the `describe-commit` CLI tool.\n\n- Added project description and AI provider support\n- Included features list for better visibility\n- Updated installation instructions with binary and Docker options\n- Provided usage examples for generating commit messages\n```\n\nBut if you want to use Gemini instead:\n\n```shell\ndescribe-commit --ai gemini --gemini-api-key \"your-gemini-api-key\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cstrong\u003e☝ Generate a short commit message (only the first line) with emojis\u003c/strong\u003e\u003c/summary\u003e\n\n```shell\ndescribe-commit -s -e\n```\n\nWill give you something like this:\n\n```markdown\n📝 docs(README): Update project description and installation instructions\n```\n\n\u003c/details\u003e\n\n\u003c!--GENERATED:APP_README--\u003e\n## 💻 Command line interface\n\n```\nDescription:\n   This tool leverages AI to generate commit messages based on changes made in a Git repository.\n\nUsage:\n   describe-commit [\u003coptions\u003e] [\u003cgit-dir-path\u003e]\n\nVersion:\n   0.0.0@undefined\n\nOptions:\n   --config-file=\"…\", -c=\"…\"                        Path to the configuration file (default: depends/on/your-os/describe-commit.yml) [$CONFIG_FILE]\n   --short-message-only, -s                         Generate a short commit message (subject line) only [$SHORT_MESSAGE_ONLY]\n   --commit-history-length=\"…\", --cl=\"…\", --hl=\"…\"  Number of previous commits from the Git history (0 = disabled) (default: 20) [$COMMIT_HISTORY_LENGTH]\n   --enable-emoji, -e                               Enable emoji in the commit message [$ENABLE_EMOJI]\n   --max-output-tokens=\"…\"                          Maximum number of tokens in the output message (default: 500) [$MAX_OUTPUT_TOKENS]\n   --ai-provider=\"…\", --ai=\"…\"                      AI provider name (gemini|openai|openrouter|anthropic) (default: gemini) [$AI_PROVIDER]\n   --gemini-api-key=\"…\", --ga=\"…\"                   Gemini API key (https://bit.ly/4jZhiKI, as of February 2025 it's free) [$GEMINI_API_KEY]\n   --gemini-model-name=\"…\", --gm=\"…\"                Gemini model name (https://bit.ly/4i02ARR) (default: gemini-2.0-flash) [$GEMINI_MODEL_NAME]\n   --openai-api-key=\"…\", --oa=\"…\"                   OpenAI API key (https://bit.ly/4i03NbR, you need to add funds to your account) [$OPENAI_API_KEY]\n   --openai-model-name=\"…\", --om=\"…\"                OpenAI model name (https://bit.ly/4hXCXkL) (default: gpt-4o-mini) [$OPENAI_MODEL_NAME]\n   --openrouter-api-key=\"…\", --ora=\"…\"              OpenRouter API key (https://bit.ly/4hU1yY1) [$OPENROUTER_API_KEY]\n   --openrouter-model-name=\"…\", --orm=\"…\"           OpenRouter model name (https://bit.ly/4ktktuG) (default: nvidia/llama-3.1-nemotron-70b-instruct:free) [$OPENROUTER_MODEL_NAME]\n   --anthropic-api-key=\"…\", --ana=\"…\"               Anthropic API key (https://bit.ly/4klw0Mw) [$ANTHROPIC_API_KEY]\n   --anthropic-model-name=\"…\", --anm=\"…\"            Anthropic model name (https://bit.ly/4bmQDDV) (default: claude-3-7-sonnet-20250219) [$ANTHROPIC_MODEL_NAME]\n   --help, -h                                       Show help\n   --version, -v                                    Print the version\n```\n\u003c!--/GENERATED:APP_README--\u003e\n\n## 📜 License\n\nThis is open-sourced software licensed under the [MIT License][link_license].\n\n[link_license]:https://github.com/tarampampam/describe-commit/blob/master/LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarampampam%2Fdescribe-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarampampam%2Fdescribe-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarampampam%2Fdescribe-commit/lists"}