Metadata-Version: 2.4
Name: GitKat
Version: 0.4.0
Summary: Bulk Git repository management toolkit.
Project-URL: Homepage, https://github.com/Aureuma/GitKat
Project-URL: Repository, https://github.com/Aureuma/GitKat
Project-URL: Changelog, https://github.com/Aureuma/GitKat/blob/main/CHANGELOG.md
License: MIT License
        
        Copyright (c) 2025 Shawn Azdam
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: cli,git,history,rewrite
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Version Control :: Git
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Requires-Dist: git-filter-repo>=2.38.0
Requires-Dist: requests>=2.32.3
Provides-Extra: dev
Requires-Dist: mkdocs-material>=9.5.30; extra == 'dev'
Requires-Dist: mkdocs>=1.6.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=8.3.2; extra == 'dev'
Requires-Dist: responses>=0.25.3; extra == 'dev'
Requires-Dist: ruff>=0.6.9; extra == 'dev'
Description-Content-Type: text/markdown

<a href="https://github.com/Aureuma/GitKat">
  <img src="docs/assets/logo.svg" alt="⫷⫸" width="88" height="88">
</a>

# 𝔾𝚒𝚝𝕂𝚊𝚝 ⫷⫸

[![CI](https://github.com/Aureuma/GitKat/actions/workflows/ci.yml/badge.svg)](https://github.com/Aureuma/GitKat/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/GitKat.svg?logo=pypi&logoColor=white)](https://pypi.org/project/GitKat/)
[![codecov](https://codecov.io/gh/Aureuma/GitKat/branch/main/graph/badge.svg)](https://codecov.io/gh/Aureuma/GitKat)
[![GitHub](https://img.shields.io/badge/GitHub-Aureuma/GitKat-181717?logo=github&logoColor=white)](https://github.com/Aureuma/GitKat)

𝔾𝚒𝚝𝕂𝚊𝚝 ⫷⫸ (GitKat) is a Python toolkit for managing Git repositories in bulk. It ships a single CLI, `gk`, that mirrors the legacy shell scripts while adding a packaged, testable workflow.

## Install

Using uv:

```sh
uv venv
uv pip install -e .
```

Using pip:

```sh
python -m venv .venv
. .venv/bin/activate
pip install -e .
```

## Quick start

```sh
gk check "Example Name"
gk report .
gk push
gk rewrite -m olddomain.com:newdomain.com --ignore-case --preserve-case
gk github-emails --token YOUR_GITHUB_TOKEN
```

## Commands

- `gk check <name>`: search author and committer names across repos in the current directory.
- `gk report [path]`: list unique author emails for each repo under a path.
- `gk push`: force-push the current branch of each repo in the current directory.
- `gk rewrite`: rewrite identity metadata and/or blob contents using git-filter-repo.
- `gk github-emails --token <token>`: find contribution emails across GitHub repos you can access.

## Rewrite notes

`gk rewrite` preserves the existing behavior of `rewrite.sh`, including case-aware blob mapping and commit metadata rewrites. It runs `git filter-repo` under the hood, so you need Git and git-filter-repo installed.

Examples:

```sh
# Identity rewrite
gk rewrite -n "New Name" -e "new@example.test" -o "old@example.test"

# Blob rewrite with preserved casing and case-insensitive matching
gk rewrite -m foo:bar --ignore-case --preserve-case

# Exclude files from blob rewrites
gk rewrite -m token:REDACTED -x "data/*.csv" -x "vendor/*"

# Rename file paths using the same mappings
gk rewrite -m oldname:newname --rename-files
```

## Development

```sh
uv pip install -e .
uv pip install -e . --group dev
uv run pytest
uv run mkdocs serve
```

Coverage (latest local run):

```sh
uv run pytest --cov=gitkat --cov-report=term-missing
```

## License

MIT License. See `LICENSE`.
