Skip to main content

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

 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

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

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:

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:

~/.gitk_config/logs/gitk.log

This helps in troubleshooting without cluttering your CLI output.

Metadata

Release files for gitk 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitk 0.1.3
File Size Uploaded Provenance Actions
gitk-0.1.3.tar.gz 25.3 kB Without provenance Details for gitk-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gitk 0.1.3
File Interpreter ABI Platform Actions
gitk-0.1.3-py3-none-any.whl Python 3 none any Details for gitk-0.1.3-py3-none-any.whl

Total release size: 47.6 kB

Release files / gitk-0.1.3.tar.gz

Download URL gitk-0.1.3.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e66f56a96da5e5c8831ead561d6517ff8db7e1e18f85a5caab30d26cd80ea92c
BLAKE2b-256 checksum
How to use checksums
6df1c943563f39cb82df7213ce9ed9dc1791fb7c64ecbbbb200a80f5931e4d38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / gitk-0.1.3-py3-none-any.whl

Download URL gitk-0.1.3-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a340c7e246efa40cad843ef346b152daaa24cba481e3147dd9b0979913d830b4
BLAKE2b-256 checksum
How to use checksums
828ce376be5eae3da6cf4155e0f4a215f814d1728879bf2c0c0873600ed1b000
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for gitk 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page