rename: myclaude -> myagents

This commit is contained in:
Zhengshou Lai
2026-07-01 23:27:14 +08:00
parent 1db0187b70
commit 7f1aa9f27e
23 changed files with 859 additions and 937 deletions
+20 -13
View File
@@ -1,9 +1,10 @@
ROOT_DIR := $(shell pwd)
VENV_MYCLAUDE := $(ROOT_DIR)/.venv/bin/myclaude
USER_LOCAL_MYCLAUDE := $(HOME)/.local/bin/myclaude
VENV_BIN_DIR := $(ROOT_DIR)/.venv/bin
USER_BIN_DIR := $(HOME)/.local/bin
COMMANDS := myagents myclaude mykimi
COMP_DIR := $(HOME)/.local/bin/completions
.PHONY: help install uninstall _symlink-myclaude _install-completions _uninstall-completions
.PHONY: help install uninstall _symlink-commands _install-completions _uninstall-completions
help:
@echo "Usage: make [target]"
@@ -18,22 +19,28 @@ install:
test -x .venv/bin/pip || python3 -m venv .venv; \
PIP_USER=0 .venv/bin/pip install -e .; \
fi
@$(MAKE) _symlink-myclaude
@$(MAKE) _symlink-commands
@$(MAKE) _install-completions
_symlink-myclaude:
@test -x "$(VENV_MYCLAUDE)" || { echo "error: missing $(VENV_MYCLAUDE)"; exit 1; }
@mkdir -p "$(HOME)/.local/bin"
@ln -sf "$(VENV_MYCLAUDE)" "$(USER_LOCAL_MYCLAUDE)"
@echo "Linked $(USER_LOCAL_MYCLAUDE) -> $(VENV_MYCLAUDE)"
_symlink-commands:
@mkdir -p "$(USER_BIN_DIR)"
@for cmd in $(COMMANDS); do \
src="$(VENV_BIN_DIR)/$$cmd"; \
dst="$(USER_BIN_DIR)/$$cmd"; \
test -x "$$src" || { echo "error: missing $$src"; exit 1; }; \
ln -sf "$$src" "$$dst"; \
echo "Linked $$dst -> $$src"; \
done
_install-completions:
@$(ROOT_DIR)/scripts/install_completion.sh "$(VENV_MYCLAUDE)" "$(COMP_DIR)"
@$(ROOT_DIR)/scripts/install_completion.sh "$(VENV_BIN_DIR)" "$(COMP_DIR)"
uninstall: _uninstall-completions
@ROOT_DIR="$(ROOT_DIR)" python3 "$(ROOT_DIR)/scripts/rm_user_local_myclaude.py"
@ROOT_DIR="$(ROOT_DIR)" python3 "$(ROOT_DIR)/scripts/rm_user_local_myagents.py"
_uninstall-completions:
@rm -f "$(COMP_DIR)/_myclaude" "$(COMP_DIR)/myclaude.bash"
@rm -f \
"$(COMP_DIR)/_myagents" "$(COMP_DIR)/myagents.bash" \
"$(COMP_DIR)/_myclaude" "$(COMP_DIR)/myclaude.bash" \
"$(COMP_DIR)/_mykimi" "$(COMP_DIR)/mykimi.bash"
@echo "Removed completions"