From a08333b70ab25d0a257675ce83ca0b121d0e56b2 Mon Sep 17 00:00:00 2001 From: Hugo Nijhuis Date: Tue, 2 Jun 2026 11:32:56 +0200 Subject: [PATCH] Add start-llm and stop-llm commands to Makefile --- Makefile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 32c5fcf..297dcc3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: install uninstall status +.PHONY: install uninstall status start-llm stop-llm restart-llm OPENCODE_DIR := $(HOME)/.config/opencode REPO_DIR := $(shell pwd) @@ -9,6 +9,8 @@ ITEMS := skills tools agents # LLM services to manage LLM_SERVICES := atlas forge swift +PLIST_PATH := ~/Library/LaunchAgents + install: @echo "Installing OpenCode config symlinks..." @mkdir -p $(OPENCODE_DIR) @@ -49,9 +51,21 @@ status: fi \ done +stop-llm-%: + @echo "Stopping com.vllm-mlx-$*..." + @launchctl bootout gui/$$(id -u) $(PLIST_PATH)/com.vllm-mlx.$*.plist 2>/dev/null || true + +stop-llm: $(patsubst %,stop-llm-%,$(LLM_SERVICES)) + +start-llm-%: + @echo "Starting com.vllm-mlx-$*..." + @launchctl bootstrap gui/$$(id -u) $(PLIST_PATH)/com.vllm-mlx.$*.plist + +start-llm: $(patsubst %,start-llm-%,$(LLM_SERVICES)) + restart-llm-%: @echo "Restarting com.vllm-mlx-$*..." - @launchctl bootout gui/$$(id -u) ~/Library/LaunchAgents/com.vllm-mlx.$*.plist || true - @launchctl bootstrap gui/$$(id -u) ~/Library/LaunchAgents/com.vllm-mlx.$*.plist + @launchctl bootout gui/$$(id -u) $(PLIST_PATH)/com.vllm-mlx.$*.plist || true + @launchctl bootstrap gui/$$(id -u) $(PLIST_PATH)/com.vllm-mlx.$*.plist restart-llm: $(patsubst %,restart-llm-%,$(LLM_SERVICES)) \ No newline at end of file