git-cai-cli


Namegit-cai-cli JSON
Version 0.1.0.post3 PyPI version JSON
download
home_pageNone
SummaryUse LLM to create git commits
upload_time2025-10-06 19:44:30
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords git llm commit ai genai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cai

`cai` is a Git extension written in Python that automates commit message creation. It allows you to run `git cai` to automatically generate a commit message based on changes and new additions in your repository.  

`cai` leverages a **large language model (LLM)** to generate meaningful and context-aware commit messages. Currently, it supports the **OpenAI** and **Gemini API** for generating commit messages.

## Table of Contents

- [About](#about-section)
- [Prerequisites](#prerequisites)
- [Features](#features-section)
- [Installation](#installation-section)
- [Usage](#usage-section)
- [License](#license-section)

<h2 id="about-section">About</h2>

`cai` is designed to simplify your Git workflow by automatically generating commit messages using an LLM. No more struggling to summarize changes — `git cai` does it for you.  

Currently, the only supported backend are the OpenAI and Gemini API, but additional LLM integrations may be added in the future.

<h2 id="prerequisites">Prerequisites</h2>

- Python 3.10 or higher
- [Pipx](https://pypi.org/project/pipx/) or [Pip](https://pypi.org/project/pip/) if installed in a virtual environment
- API key, currently supported
  - OpenAI
  - Gemini

<h2 id="features-section">Features</h2>

- Automatically detects added, modified, and deleted files
- Generates meaningful commit messages using an LLM
- Seamless integration with Git as a plugin/extension
- Written in Python for easy customization

<h2 id="installation-section">Installation</h2>

Install by

```sh
pipx install git-cai-cli
```

Afterwards set cai to PATH by

```sh
pipx ensurepath
```

Restart your shell by executing `bash` or `zsh` or whatever else is your used shell.

<h2 id="usage-section">Usage</h2>

Once installed, you can use `cai` like a normal Git command:

```sh
git cai
```

`cai` automatically creates a configuration file at: `~/.config/cai/token.yml`
This file stores your OpenAI API key, which is used every time you run `git cai`.
Open `~/.config/cai/token.yml` and store your token from OpenAI.
If a `cai_config.yml` file exists in the root of your repository, `cai` will use the settings defined there. Otherwise, it falls back to default settings, which are automatically created in the same directory as `token.yml` if they don’t already exist.
Currently, the only configurable options are:

- LLM model
- Temperature

`cai` uses Git’s `diff` output as input for generating commit messages.  
To exclude specific files or directories from being included in the generated commit message, create a `.caiignore` file in the root of your repository. This file works like a `.gitignore`.  

- Files listed in `.gitignore` are **always excluded**.  
- `.caiignore` is only needed for files that are tracked by Git but should **not** be included in the commit message.

<h2 id="license-section">License</h2>
This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "git-cai-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "Git, LLM, Commit, AI, GenAI",
    "author": null,
    "author_email": "Thorsten Foltz <thorsten.foltz@live.com>",
    "download_url": "https://files.pythonhosted.org/packages/aa/a3/15c702243644951396d0c3a1f315ef28e9c34ea1a3d72ccc9f548a5175f9/git_cai_cli-0.1.0.post3.tar.gz",
    "platform": null,
    "description": "# cai\n\n`cai` is a Git extension written in Python that automates commit message creation. It allows you to run `git cai` to automatically generate a commit message based on changes and new additions in your repository.  \n\n`cai` leverages a **large language model (LLM)** to generate meaningful and context-aware commit messages. Currently, it supports the **OpenAI** and **Gemini API** for generating commit messages.\n\n## Table of Contents\n\n- [About](#about-section)\n- [Prerequisites](#prerequisites)\n- [Features](#features-section)\n- [Installation](#installation-section)\n- [Usage](#usage-section)\n- [License](#license-section)\n\n<h2 id=\"about-section\">About</h2>\n\n`cai` is designed to simplify your Git workflow by automatically generating commit messages using an LLM. No more struggling to summarize changes \u2014 `git cai` does it for you.  \n\nCurrently, the only supported backend are the OpenAI and Gemini API, but additional LLM integrations may be added in the future.\n\n<h2 id=\"prerequisites\">Prerequisites</h2>\n\n- Python 3.10 or higher\n- [Pipx](https://pypi.org/project/pipx/) or [Pip](https://pypi.org/project/pip/) if installed in a virtual environment\n- API key, currently supported\n  - OpenAI\n  - Gemini\n\n<h2 id=\"features-section\">Features</h2>\n\n- Automatically detects added, modified, and deleted files\n- Generates meaningful commit messages using an LLM\n- Seamless integration with Git as a plugin/extension\n- Written in Python for easy customization\n\n<h2 id=\"installation-section\">Installation</h2>\n\nInstall by\n\n```sh\npipx install git-cai-cli\n```\n\nAfterwards set cai to PATH by\n\n```sh\npipx ensurepath\n```\n\nRestart your shell by executing `bash` or `zsh` or whatever else is your used shell.\n\n<h2 id=\"usage-section\">Usage</h2>\n\nOnce installed, you can use `cai` like a normal Git command:\n\n```sh\ngit cai\n```\n\n`cai` automatically creates a configuration file at: `~/.config/cai/token.yml`\nThis file stores your OpenAI API key, which is used every time you run `git cai`.\nOpen `~/.config/cai/token.yml` and store your token from OpenAI.\nIf a `cai_config.yml` file exists in the root of your repository, `cai` will use the settings defined there. Otherwise, it falls back to default settings, which are automatically created in the same directory as `token.yml` if they don\u2019t already exist.\nCurrently, the only configurable options are:\n\n- LLM model\n- Temperature\n\n`cai` uses Git\u2019s `diff` output as input for generating commit messages.  \nTo exclude specific files or directories from being included in the generated commit message, create a `.caiignore` file in the root of your repository. This file works like a `.gitignore`.  \n\n- Files listed in `.gitignore` are **always excluded**.  \n- `.caiignore` is only needed for files that are tracked by Git but should **not** be included in the commit message.\n\n<h2 id=\"license-section\">License</h2>\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Use LLM to create git commits",
    "version": "0.1.0.post3",
    "project_urls": {
        "Homepage": "https://github.com/thorstenfoltz/cai",
        "Issues": "https://github.com/thorstenfoltz/cai/issues"
    },
    "split_keywords": [
        "git",
        " llm",
        " commit",
        " ai",
        " genai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "adcae334f72e0e83ef457a7acb8fc2df9fb2591158fca2216d8f8e118a6a1f2c",
                "md5": "9cd86f45f1bfe23561a52f34551cad3c",
                "sha256": "484c0ac1710a1d33811fa2ce7b0316b047927329e1870ca42b6e71c80c5b1cf5"
            },
            "downloads": -1,
            "filename": "git_cai_cli-0.1.0.post3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9cd86f45f1bfe23561a52f34551cad3c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 10109,
            "upload_time": "2025-10-06T19:44:28",
            "upload_time_iso_8601": "2025-10-06T19:44:28.063822Z",
            "url": "https://files.pythonhosted.org/packages/ad/ca/e334f72e0e83ef457a7acb8fc2df9fb2591158fca2216d8f8e118a6a1f2c/git_cai_cli-0.1.0.post3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aaa315c702243644951396d0c3a1f315ef28e9c34ea1a3d72ccc9f548a5175f9",
                "md5": "a7a896cacc4efd323e44a8a4b4364cca",
                "sha256": "f26a98b430906907a2903cd0416afb5af738d10fc484bfd82fcf3f6deed7f4cb"
            },
            "downloads": -1,
            "filename": "git_cai_cli-0.1.0.post3.tar.gz",
            "has_sig": false,
            "md5_digest": "a7a896cacc4efd323e44a8a4b4364cca",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 74009,
            "upload_time": "2025-10-06T19:44:30",
            "upload_time_iso_8601": "2025-10-06T19:44:30.316773Z",
            "url": "https://files.pythonhosted.org/packages/aa/a3/15c702243644951396d0c3a1f315ef28e9c34ea1a3d72ccc9f548a5175f9/git_cai_cli-0.1.0.post3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-06 19:44:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thorstenfoltz",
    "github_project": "cai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "git-cai-cli"
}
        
Elapsed time: 1.92209s