tgit/holds the Python package and CLI entry point. Key modules includecli.py,commit.py,changelog.py,version.py, andsettings.py.tgit/prompts/contains Jinja2 prompt templates used by the AI commit flow.tgit/utils/hosts shared helpers.tests/is split intotests/unit/andtests/integration/, with shared fixtures intests/conftest.py.scripts/contains automation such asscripts/test.shandscripts/publish.sh.- Generated artifacts live in
dist/,htmlcov/, andcoverage.xml.
uv syncinstalls dependencies (use this for a fresh dev environment).uv pip install -e ".[dev]"installs in editable mode with dev tools.uv run ruff check .runs linting (strict rules configured inpyproject.toml).uv run ruff format .applies formatting (line length 140)../scripts/test.shruns the full test suite with coverage and a configurable threshold.uv run pytest tests/unit/runs unit tests directly when you want faster feedback.uv buildbuilds the package for distribution.
- Python 3.11+ only, 4-space indentation.
- Keep type hints for function parameters and return values.
- Follow ruff defaults plus repository rules; avoid unused imports and keep lines under 140 characters.
- Names:
snake_casefor modules/functions,PascalCasefor classes,UPPER_SNAKE_CASEfor constants.
- Framework:
pytestwithpytest-cov. - Naming patterns (from
pyproject.toml): filestest_*.pyor*_test.py, classesTest*, functionstest_*. - Markers:
unit,integration,slow(use-m "not slow"to skip). - Coverage reports are generated in
htmlcov/andcoverage.xmlviascripts/test.sh.
- Commit messages follow an emoji prefix plus Conventional Commit style. Example:
:sparkles: feat(version): add --no-recursive option to version command. - Release commits use
:bookmark: version: vX.Y.Z. - PRs should describe the change, list tests run, and link related issues. Include screenshots only for CLI output or documentation changes.
- Local settings live in
.tgit.yaml(workspace) or~/.tgit.yaml(global). Do not commit real API keys or tokens.