Metadata-Version: 2.4
Name: gitk
Version: 0.1.0
Summary: AI-powered CLI tool for generating git commit messages
Author-email: xifOO <wedyi28111@gmail.com>
License: MIT
Keywords: git,commit,ai,cli
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Version Control
Classifier: Environment :: Console
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: annotated-types==0.7.0
Requires-Dist: anyio==4.9.0
Requires-Dist: blessed==1.21.0
Requires-Dist: cachetools==6.1.0
Requires-Dist: certifi==2025.7.14
Requires-Dist: charset-normalizer==3.4.2
Requires-Dist: distro==1.9.0
Requires-Dist: editor==1.6.6
Requires-Dist: grpcio==1.73.1
Requires-Dist: grpcio-status==1.71.0
Requires-Dist: h11==0.16.0
Requires-Dist: httpcore==1.0.9
Requires-Dist: httplib2==0.22.0
Requires-Dist: httpx==0.28.1
Requires-Dist: idna==3.10
Requires-Dist: iniconfig==2.1.0
Requires-Dist: inquirer==3.4.0
Requires-Dist: jiter==0.10.0
Requires-Dist: openai==1.97.0
Requires-Dist: packaging==25.0
Requires-Dist: prompt_toolkit==3.0.51
Requires-Dist: proto-plus==1.26.1
Requires-Dist: protobuf==5.29.5
Requires-Dist: pyasn1==0.6.1
Requires-Dist: pyasn1_modules==0.4.2
Requires-Dist: pydantic==2.11.7
Requires-Dist: pydantic_core==2.33.2
Requires-Dist: Pygments==2.19.2
Requires-Dist: pyparsing==3.2.3
Requires-Dist: PyYAML==6.0.2
Requires-Dist: questionary==2.1.0
Requires-Dist: readchar==4.2.1
Requires-Dist: regex==2024.11.6
Requires-Dist: requests==2.32.4
Requires-Dist: rsa==4.9.1
Requires-Dist: six==1.17.0
Requires-Dist: sniffio==1.3.1
Requires-Dist: tqdm==4.67.1
Requires-Dist: typing-inspection==0.4.1
Requires-Dist: typing_extensions==4.14.1
Requires-Dist: uritemplate==4.2.0
Requires-Dist: urllib3==2.5.0
Requires-Dist: wcwidth==0.2.13
Requires-Dist: xmod==1.8.1
Requires-Dist: click==8.2.1
Dynamic: license-file

# 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.

