Metadata-Version: 2.3
Name: git-metainfo-python
Version: 0.1.2
Summary: Generate git metadata JSON files
License: MIT
Author: Kevin Tran
Requires-Python: >=3.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.13
Project-URL: Homepage, https://github.com/orientalperil/git-metainfo-python
Description-Content-Type: text/markdown

# git-metainfo

## Generate git metadata JSON

Output git metadata:

```bash
$ git-metainfo
{
  "hash": "40b71138b4ef89496645e377008e11eedbe207d6",
  "short_hash": "40b7113",
  "author_name": "John Doe",
  "author_email": "john@doe.com",
  "author_date": "2026-05-08 22:06:47 -0700",
  "author_date_iso": "2026-05-08T22:06:47-07:00",
  "committer_name": "John Doe",
  "committer_email": "john@doe.com",
  "committer_date": "2026-05-08 22:06:47 -0700",
  "committer_date_iso": "2026-05-08T22:06:47-07:00",
  "message": "Code",
  "branch": "master",
  "detached_head": false
}
```

Output to a file:

`git-metainfo --output file.json`

Use as library:

```python
from git_metainfo.core import get_git_data

data = get_git_data()
```

## Development

### Install

`poetry install`

### Install pre-commit

`pre-commit install`

### Format

`ruff format && isort .`

## See also:

[Typescript version](https://github.com/orientalperil/git-metainfo-typescript)

