Files
myagents/Makefile
T
Zhengshou Lai 78ca74152f feat: add hermes backend support
- Add myhermes entrypoint and myagents hermes subcommand
- Hermes sessions read from global SQLite store (~/.hermes/state.db)
- Default args: --yolo
- Update README, AGENTS.md, Makefile, pyproject.toml
- Add tests for hermes subcommand, passthrough, and session listing
2026-07-15 10:21:38 +08:00

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
.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"