aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 92933b7..892104a 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ RULES_DIR := $(HOME)/.claude/rules
SKILLS := c4-analyze c4-diagram debug add-tests respond-to-review review-pr fix-issue security-check
RULES := $(wildcard claude-rules/*.md)
-.PHONY: install uninstall list
+.PHONY: install uninstall install-hooks list
install:
@mkdir -p $(SKILLS_DIR) $(RULES_DIR)
@@ -34,6 +34,20 @@ install:
@echo ""
@echo "done"
+install-hooks:
+ifndef TARGET
+ $(error Usage: make install-hooks TARGET=/path/to/project)
+endif
+ @mkdir -p $(TARGET)/.claude
+ @if [ -e "$(TARGET)/.claude/settings.json" ]; then \
+ echo " WARN $(TARGET)/.claude/settings.json already exists — not overwriting"; \
+ echo " Compare with: diff $(CURDIR)/hooks/settings.json $(TARGET)/.claude/settings.json"; \
+ else \
+ cp "$(CURDIR)/hooks/settings.json" "$(TARGET)/.claude/settings.json"; \
+ echo " copy settings.json → $(TARGET)/.claude/settings.json"; \
+ fi
+ @echo "done"
+
uninstall:
@echo "Skills:"
@for skill in $(SKILLS); do \