Cursor Agent CLI wrapper (mycursor) with resume/session listing. Product xiaohe CLI stays in xiaohe-api only — no dual entry.
39 lines
1.1 KiB
Makefile
39 lines
1.1 KiB
Makefile
ROOT_DIR := $(shell pwd)
|
|
VENV_BIN_DIR := $(ROOT_DIR)/.venv/bin
|
|
USER_BIN_DIR := $(HOME)/.local/bin
|
|
COMMANDS := myagents myclaude mykimi mycodex myhermes mycursor
|
|
|
|
.PHONY: help install uninstall _symlink-commands
|
|
|
|
help:
|
|
@echo "Usage: make [target]"
|
|
@echo ""
|
|
@echo " install Sync venv, symlink bin, install shell completions"
|
|
@echo " uninstall Remove bin, completions and user symlinks"
|
|
|
|
install:
|
|
@cd "$(ROOT_DIR)" && \
|
|
if command -v uv >/dev/null 2>&1; then \
|
|
uv sync; \
|
|
else \
|
|
test -x .venv/bin/pip || python3 -m venv .venv; \
|
|
PIP_USER=0 .venv/bin/pip install -e .; \
|
|
fi
|
|
@$(MAKE) _symlink-commands
|
|
@echo "Installing shell completions…"
|
|
@myagents completion install || echo "Warning: completion install failed"
|
|
|
|
_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
|
|
|
|
uninstall:
|
|
@myagents completion uninstall || true
|
|
@ROOT_DIR="$(ROOT_DIR)" python3 "$(ROOT_DIR)/scripts/rm_user_local_myagents.py"
|