Files
guide/hooks/cli.py
2025-11-22 10:51:25 +00:00

26 lines
675 B
Python

"""Lightweight project hook runner.
This stub exists so tooling that expects a stop hook can run without error.
It accepts an ``--event`` argument (e.g. "stop") and exits successfully.
"""
from __future__ import annotations
import argparse
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Project hook entrypoint")
parser.add_argument("--event", default="", help="Hook event name")
return parser.parse_args()
def main() -> None:
args = parse_args()
# Keep behaviour intentionally minimal: acknowledge the event and exit 0.
print(f"hook received event: {args.event}")
if __name__ == "__main__":
main()