Skip to content

orientalperil/git-metainfo-python

Repository files navigation

git-metainfo

Generate git metadata JSON

Output git metadata:

$ 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:

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

About

Generate git metadata JSON

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages