diff --git a/README.md b/README.md index be10709..bc87f7d 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,27 @@ Generate markdown documentation from directory structure. Optimized for LLM inge - Frontend only mode (include only frontend files and `README.md`) - Omit test files and inline test blocks (Go, Java, Rust) +## Use with Git Post Hook +combine with git post hook to sync with proton drive on each commit + +add something like this in ./.git/hooks/post-commit + +```bash +#!/bin/bash + +set -euo pipefail + +if ! command -v dirmd &>/dev/null; then + exit 0 +fi + +REPO_ROOT=$(git rev-parse --show-toplevel) +REPO_NAME=$(basename "$REPO_ROOT") + +dirmd -o "/tmp/${REPO_NAME}" "$REPO_ROOT" -f --vertical-slices --proton-drive +``` + + ## Build go build -o dirmd .