|
| 1 | +# calm-suite dev launcher |
| 2 | +# |
| 3 | +# The calm-suite products are root npm workspaces, so every target runs from the |
| 4 | +# repo root (one level up). Requires Node 22 (`nvm use` at the repo root). |
| 5 | +# |
| 6 | +# Usage: `make -C calm-suite <target>` (or `cd calm-suite && make <target>`) |
| 7 | + |
| 8 | +ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..) |
| 9 | +NPM := cd $(ROOT) && npm |
| 10 | + |
| 11 | +# Built entrypoint for the CalmStudio MCP server (bin: calmstudio-mcp) |
| 12 | +MCP_BIN := $(ROOT)/calm-suite/calm-studio/packages/mcp-server/dist/index.js |
| 13 | + |
| 14 | +.DEFAULT_GOAL := help |
| 15 | +.PHONY: help install guard guard-docs studio studio-desktop studio-deps build-guard build-studio test mcp-build mcp claude-mcp |
| 16 | + |
| 17 | +help: ## List available targets |
| 18 | + @grep -hE '^[a-z0-9-]+:.*?## ' $(MAKEFILE_LIST) \ |
| 19 | + | awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' |
| 20 | + |
| 21 | +install: ## Install all workspaces from the lockfile (npm ci, repo root) |
| 22 | + $(NPM) ci |
| 23 | + |
| 24 | +guard: ## Run CALMGuard (Next.js) dev server |
| 25 | + $(NPM) run dev --workspace=calmguard |
| 26 | + |
| 27 | +guard-docs: ## Run CALMGuard docs (Docusaurus) dev server |
| 28 | + $(NPM) run docs:dev --workspace=calmguard |
| 29 | + |
| 30 | +studio-deps: ## Build CALM Studio workspace deps that ship from dist (calm-core) |
| 31 | + $(NPM) run build --workspace=@calmstudio/calm-core |
| 32 | + |
| 33 | +studio: studio-deps ## Run CALM Studio (SvelteKit) web dev server |
| 34 | + $(NPM) run dev --workspace=@calmstudio/studio |
| 35 | + |
| 36 | +studio-desktop: studio-deps ## Run CALM Studio desktop shell (Tauri) |
| 37 | + $(NPM) run tauri --workspace=@calmstudio/studio dev |
| 38 | + |
| 39 | +build-guard: ## Production build of CALMGuard |
| 40 | + $(NPM) run build --workspace=calmguard |
| 41 | + |
| 42 | +build-studio: ## Production build of CALM Studio |
| 43 | + $(NPM) run build --workspace=@calmstudio/studio |
| 44 | + |
| 45 | +mcp-build: studio-deps ## Build the CalmStudio MCP server (and its calm-core dep) |
| 46 | + $(NPM) run build --workspace=@calmstudio/mcp |
| 47 | + |
| 48 | +mcp: mcp-build ## Build and run the CalmStudio MCP server (stdio transport) |
| 49 | + node $(MCP_BIN) |
| 50 | + |
| 51 | +claude-mcp: mcp-build ## Register the CalmStudio MCP server with Claude Code |
| 52 | + claude mcp add --transport stdio calmstudio -- node $(MCP_BIN) |
| 53 | + |
| 54 | +test: ## Run tests for both calm-suite products |
| 55 | + $(NPM) run test:run --workspace=calmguard |
| 56 | + $(NPM) run test --workspace=@calmstudio/studio |
0 commit comments