gitk


Namegitk JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryAI-powered CLI tool for generating git commit messages
upload_time2025-08-22 21:34:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
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.11+ 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

```bash
 pip install gitk
```

---

## 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.11",
    "maintainer_email": null,
    "keywords": "git, commit, ai, cli",
    "author": null,
    "author_email": "xifOO <wedyi28111@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/99/da/7b5b14f1b7ab3c97e4888e43745b5e79eb1f00c6432c2d93268275ce2a80/gitk-0.1.2.tar.gz",
    "platform": null,
    "description": "# GitK\n\n**GitK** is a CLI tool built with Python 3.11+ 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```bash\n pip install gitk\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.2",
    "project_urls": null,
    "split_keywords": [
        "git",
        " commit",
        " ai",
        " cli"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9174199b5d7cc05defe5518d7ed702e56d97621007fd7b410e0c9d02b309292f",
                "md5": "77f2e9b94c7abbac58fc7fb674178fee",
                "sha256": "2908b916d7c6c573a5ad619d2b212a8536f18b22b4808d7c7439554d511709c6"
            },
            "downloads": -1,
            "filename": "gitk-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "77f2e9b94c7abbac58fc7fb674178fee",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 21641,
            "upload_time": "2025-08-22T21:34:24",
            "upload_time_iso_8601": "2025-08-22T21:34:24.724106Z",
            "url": "https://files.pythonhosted.org/packages/91/74/199b5d7cc05defe5518d7ed702e56d97621007fd7b410e0c9d02b309292f/gitk-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "99da7b5b14f1b7ab3c97e4888e43745b5e79eb1f00c6432c2d93268275ce2a80",
                "md5": "3a20ee3498d0fdf45fde766cbade1af6",
                "sha256": "24873f167393b104afc0b9461d96a6682dd7018dcb0cbbf6d434bf3572aa331b"
            },
            "downloads": -1,
            "filename": "gitk-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3a20ee3498d0fdf45fde766cbade1af6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 24524,
            "upload_time": "2025-08-22T21:34:25",
            "upload_time_iso_8601": "2025-08-22T21:34:25.815129Z",
            "url": "https://files.pythonhosted.org/packages/99/da/7b5b14f1b7ab3c97e4888e43745b5e79eb1f00c6432c2d93268275ce2a80/gitk-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-22 21:34:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gitk"
}
        
Elapsed time: 0.67288s