Download tools/hooks/pre-commit from i-Lang/Mem-Forever: direct link, hf CLI and curl.
- Browser
- Download file 541 Bytes
-
https://huggingface.co/datasets/i-Lang/Mem-Forever/resolve/main/tools/hooks/pre-commit
- Command line
-
hf download hf://datasets/i-Lang/Mem-Forever/tools/hooks/pre-commit
-
curl -L -o pre-commit https://huggingface.co/datasets/i-Lang/Mem-Forever/resolve/main/tools/hooks/pre-commit
541 Bytes
| #!/bin/sh | |
| # Mem-Forever 3.0: every writer passes the same gate. Reviews staged soul/ memory/ handoff/ files against HEAD | |
| # with the source rules, then runs check. Installed by brain.py install (core.hooksPath tools/hooks). | |
| set -u | |
| PY="${BRAIN_PYTHON:-python}" | |
| command -v "$PY" >/dev/null 2>&1 || PY=python3 | |
| "$PY" -X utf8 tools/brain.py review --staged || { echo "pre-commit: review rejected the change; nothing committed"; exit 1; } | |
| "$PY" -X utf8 tools/brain.py check || { echo "pre-commit: check failed; nothing committed"; exit 1; } | |
| exit 0 | |