gitk


Namegitk JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryAI-powered CLI tool for generating git commit messages
upload_time2025-07-29 21:34:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseMIT
keywords git commit ai cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GitK

**GitK** is a CLI tool built with Python 3.12 that leverages AI to generate meaningful commit messages based on your staged changes. It uses the OpenRouter provider to select AI models, helping you write better commits effortlessly.

---

## Features

- AI-powered commit message generation from staged diffs  
- Support for detailed and concise commit messages  
- Customizable commit message templates  
- Option to commit changes file-by-file for atomic commits (`--split`)  
- Seamless integration with Git workflows  

---

## Installation

> ⚠️ **Note:** An official installer or package is not available yet.  
> For now, clone the repo and install dependencies manually.

```bash
git clone https://github.com/xifOO/gitk.git
cd gitk

python3.12 -m venv env
source env/bin/activate  # Linux/macOS
# env\Scripts\activate   # Windows

pip install -r requirements.txt
```

---

## Key Dependencies

- click — for building the CLI interface
- requests - for HTTP requests
- pydantic — for data validation and settings management
- questionary — for interactive CLI prompts
(Full list of dependencies is available in requirements.txt)


--- 


## Usage
```bash
gitk commit [OPTIONS] [EXTRA_GIT_FLAGS]...
```
Generate AI-based commit messages from your staged changes.


## Options
 
 - [detailed]
   Generate a more detailed commit message, useful for complex diffs.
- [yes]
  Skip confirmation prompts and commit automatically with the generated message.
- [split]
  Generate and commit messages for each staged file separately for atomic commits.
- [template-file] PATH
  Use a custom commit message template file with placeholders like {{diff}} and {{instruction}}.
- [template] TEXT
  Inline template string that overrides the default template.
- [instruction] TEXT
  Provide additional context or instructions to guide AI when generating messages.
- [EXTRA_GIT_FLAGS] ...
  Pass extra flags directly to git commit (e.g., --signoff, --amend).

# Examples
  ``` bash
  gitk commit --detailed
  gitk commit --split --template-file=my_template.txt
  gitk commit --template="Change summary: {{diff}}" --yes
  gitk commit --instruction="Write in imperative tense"
  ```

---

## Configuration

  Before using GitK, run:


  ```bash
  gitk init
  ```
  This will guide you through setting up API keys, selecting AI models, and configuring your commit message templates.

---

## Logging

Errors and important events are logged to:
```bash
~/.gitk_config/logs/gitk.log
```

This helps in troubleshooting without cluttering your CLI output.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gitk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "git, commit, ai, cli",
    "author": null,
    "author_email": "xifOO <wedyi28111@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/16/e8/69046477d4a3a4a9ee239a1a9f4404e5ea4f425f2e1acceba33583cfe84f/gitk-0.1.0.tar.gz",
    "platform": null,
    "description": "# GitK\n\n**GitK** is a CLI tool built with Python 3.12 that leverages AI to generate meaningful commit messages based on your staged changes. It uses the OpenRouter provider to select AI models, helping you write better commits effortlessly.\n\n---\n\n## Features\n\n- AI-powered commit message generation from staged diffs  \n- Support for detailed and concise commit messages  \n- Customizable commit message templates  \n- Option to commit changes file-by-file for atomic commits (`--split`)  \n- Seamless integration with Git workflows  \n\n---\n\n## Installation\n\n> \u26a0\ufe0f **Note:** An official installer or package is not available yet.  \n> For now, clone the repo and install dependencies manually.\n\n```bash\ngit clone https://github.com/xifOO/gitk.git\ncd gitk\n\npython3.12 -m venv env\nsource env/bin/activate  # Linux/macOS\n# env\\Scripts\\activate   # Windows\n\npip install -r requirements.txt\n```\n\n---\n\n## Key Dependencies\n\n- click \u2014 for building the CLI interface\n- requests - for HTTP requests\n- pydantic \u2014 for data validation and settings management\n- questionary \u2014 for interactive CLI prompts\n(Full list of dependencies is available in requirements.txt)\n\n\n--- \n\n\n## Usage\n```bash\ngitk commit [OPTIONS] [EXTRA_GIT_FLAGS]...\n```\nGenerate AI-based commit messages from your staged changes.\n\n\n## Options\n \n - [detailed]\n   Generate a more detailed commit message, useful for complex diffs.\n- [yes]\n  Skip confirmation prompts and commit automatically with the generated message.\n- [split]\n  Generate and commit messages for each staged file separately for atomic commits.\n- [template-file] PATH\n  Use a custom commit message template file with placeholders like {{diff}} and {{instruction}}.\n- [template] TEXT\n  Inline template string that overrides the default template.\n- [instruction] TEXT\n  Provide additional context or instructions to guide AI when generating messages.\n- [EXTRA_GIT_FLAGS] ...\n  Pass extra flags directly to git commit (e.g., --signoff, --amend).\n\n# Examples\n  ``` bash\n  gitk commit --detailed\n  gitk commit --split --template-file=my_template.txt\n  gitk commit --template=\"Change summary: {{diff}}\" --yes\n  gitk commit --instruction=\"Write in imperative tense\"\n  ```\n\n---\n\n## Configuration\n\n  Before using GitK, run:\n\n\n  ```bash\n  gitk init\n  ```\n  This will guide you through setting up API keys, selecting AI models, and configuring your commit message templates.\n\n---\n\n## Logging\n\nErrors and important events are logged to:\n```bash\n~/.gitk_config/logs/gitk.log\n```\n\nThis helps in troubleshooting without cluttering your CLI output.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "AI-powered CLI tool for generating git commit messages",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "git",
        " commit",
        " ai",
        " cli"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "45de531671112147b35b6d4f7540b52200a3a8fa8996c5dcc655d5fe462f8784",
                "md5": "e13cf0e4f41e367eb58acc90c39b60bf",
                "sha256": "1edd561edebaac3a93c098599da2f1dbeef873e6729b35f7f454e1f5726e8bfd"
            },
            "downloads": -1,
            "filename": "gitk-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e13cf0e4f41e367eb58acc90c39b60bf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 22140,
            "upload_time": "2025-07-29T21:34:23",
            "upload_time_iso_8601": "2025-07-29T21:34:23.843804Z",
            "url": "https://files.pythonhosted.org/packages/45/de/531671112147b35b6d4f7540b52200a3a8fa8996c5dcc655d5fe462f8784/gitk-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "16e869046477d4a3a4a9ee239a1a9f4404e5ea4f425f2e1acceba33583cfe84f",
                "md5": "b105db0fa7e20d92f65624d47df65aca",
                "sha256": "b7223f129a2f6c7d5f6bb565aefb527846bf86fcfac1355fed0f4a8e8a6cd859"
            },
            "downloads": -1,
            "filename": "gitk-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b105db0fa7e20d92f65624d47df65aca",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 25863,
            "upload_time": "2025-07-29T21:34:25",
            "upload_time_iso_8601": "2025-07-29T21:34:25.153983Z",
            "url": "https://files.pythonhosted.org/packages/16/e8/69046477d4a3a4a9ee239a1a9f4404e5ea4f425f2e1acceba33583cfe84f/gitk-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-29 21:34:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gitk"
}
        
Elapsed time: 2.21385s