PyGitTools
Hooks, tooling, and pygit2 workflows used by PyGitWeb. Can be used headless for many purposes.
PGT
pgt is a terminal UI for commits, branches, tasks, and worktrees. The home page has Status, Log, Tasks, and Worktrees tabs. H / L switch tabs, J / K move the selection, Q or Ctrl-C quits, and ? opens help. On Status, ! or the Actions row runs project scripts from pyproject.toml or actions.toml. Full key bindings are in the in-app help (src/pygittools/help.md).
To run from the repo root, use uv run pgt.
Task objects may include points, a Fibonacci story-point value: 0, 1, 2, 3, 5, 8, 13, or 21. Leave it unset when the task is unestimated.
Hook framework
pygittools.hooks provides a thin Hook base class plus one subclass per git hook type
(client- and server-side). Receive-pack hooks (PreReceive, PostReceive) parse their
ref-update lines via parse_ref_updates(stdin).
pygittools.hooks_notify adds PreReceiveNotify / PostReceiveNotify: minimal hook
variants that POST ?project=<name> to a pygitweb /_internal/notify endpoint so its
long-poll updates=true subscribers wake up immediately on each push. Notification
failures never reject the push.
See hook_samples/ for ready-to-use scripts.
MCP task server
Boards, tasks, and comments stored in Git can be exposed to AI tools via MCP.
Configure the repository path with PYGITTOOLS_REPO, or set PYGITWEB_PROJECTROOT and pass a
project argument to each tool. When neither is set, the server discovers a repo from the current
working directory.
Run locally:
PYGITTOOLS_REPO=/path/to/repo uv run pygittools-mcp
Cursor project config (.cursor/mcp.json):
{
"mcpServers": {
"pygittools-tasks": {
"command": "uv",
"args": ["run", "--directory", "/path/to/pygitweb", "pygittools-mcp"],
"env": {
"PYGITTOOLS_REPO": "/path/to/your/repo"
}
}
}
}
Tools: list_boards_tool, list_tasks_tool, get_task_tool, board_by_status_tool.
Resources: board://{board_name}, task://{task_ref}.
Metadata
Release files for pygittools 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pygittools-0.3.0.tar.gz | 74.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pygittools-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 184.0 kB
Release files / pygittools-0.3.0.tar.gz
| Download URL | pygittools-0.3.0.tar.gz |
|---|---|
| Size | 74.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
195650600004f5db852cbc7dc5a3022f71a5ef10f4dcb5fa660d18079bd7010b
|
|
BLAKE2b-256 checksum How to use checksums |
59f2fe80a48d56ca41bc60173ac54eee44828409d216c43b80e5ebb08fe1d8ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pygittools-0.3.0-py3-none-any.whl
| Download URL | pygittools-0.3.0-py3-none-any.whl |
|---|---|
| Size | 109.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8e576f3976d41a6f5c24847fa86a59f10dcd8899353f8efa1fa214e9ce5988d
|
|
BLAKE2b-256 checksum How to use checksums |
30af8e7a44438113e63a7d614335076dca0689719beadfa7c2cb07f087f8078a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|