Skip to content

Commit c04345e

Browse files
Merge pull request #8 from kimchanhyung98/copilot/automate-speckit-installation
chore(build): automate Speckit installation with Make targets
2 parents 512415e + 3c0b814 commit c04345e

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

Makefile

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.PHONY: spec-kit agent-os help init
2+
3+
.DEFAULT_GOAL := help
4+
5+
help: ## Show available commands
6+
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
7+
8+
spec-kit: ## Install spec-kit (default: claude)
9+
@agent=$(word 2,$(MAKECMDGOALS)); \
10+
if [ -z "$$agent" ]; then \
11+
agent="claude"; \
12+
echo "Using default agent: claude"; \
13+
fi; \
14+
if ! command -v specify >/dev/null 2>&1; then \
15+
echo "[spec-kit] 'specify' not found."; \
16+
echo "RUN: uv tool install specify-cli --from git+https://github.com/github/spec-kit.git"; \
17+
exit 1; \
18+
fi; \
19+
yes | specify init --here --ai $$agent --script sh
20+
21+
agent-os: ## Install agent-os (default: claude)
22+
@agent=$(word 2,$(MAKECMDGOALS)); \
23+
script="$$HOME/agent-os/scripts/project-install.sh"; \
24+
if [ -z "$$agent" ]; then \
25+
agent="claude"; \
26+
echo "Using default agent: claude"; \
27+
fi; \
28+
if [ ! -f "$$script" ]; then \
29+
echo "[agent-os] 'agent-os' not found."; \
30+
echo "RUN: curl -sSL https://raw.githubusercontent.com/buildermethods/agent-os/main/scripts/base-install.sh | bash"; \
31+
exit 1; \
32+
fi; \
33+
echo "Installing agent-os with agent: $$agent"; \
34+
if [ "$$agent" = "claude" ]; then \
35+
yes | bash "$$script"; \
36+
elif [ "$$agent" = "all" ]; then \
37+
yes | bash "$$script" --agent-os-commands true --standards-as-claude-code-skills true; \
38+
else \
39+
yes | bash "$$script" --claude-code-commands false --use-claude-code-subagents false --standards-as-claude-code-skills true --agent-os-commands true; \
40+
fi
41+
42+
init: ## Setup Project environment (Docker required)
43+
@if ! command -v docker >/dev/null 2>&1; then \
44+
echo "[init] 'docker' not found"; \
45+
exit 1; \
46+
fi; \
47+
if ! docker compose version >/dev/null 2>&1; then \
48+
echo "[init] 'docker compose' not found"; \
49+
exit 1; \
50+
fi; \
51+
if [ ! -f .env ]; then \
52+
echo "Copying .env.example to .env"; \
53+
cp .env.example .env; \
54+
fi; \
55+
echo "Starting Docker containers"; \
56+
docker compose up -d; \
57+
echo "Installing npm packages"; \
58+
docker run --rm -v $$(pwd):/app -w /app node:22-alpine npm install; \
59+
echo "Running database migrations and seeders"; \
60+
docker compose exec laravel.test php artisan migrate --seed
61+
62+
%:
63+
@:

0 commit comments

Comments
 (0)