-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
99 lines (86 loc) · 3.64 KB
/
Makefile
File metadata and controls
99 lines (86 loc) · 3.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Default target
.PHONY: test test-shells test-sdk test-cli test-lint test-e2e test-fast help setup pre-commit sandbox-build sandbox-run
test:
./tests/test-all.sh
pytest python/tests
test-shells:
TEST_SHELLS="bash zsh" ./tests/test-all.sh
test-sdk:
./tests/test-all.sh sdk
test-cli:
./tests/test-all.sh cli
test-lint:
./tests/test-all.sh lint
test-e2e:
./tests/test-all.sh e2e
test-fast:
./tests/test-all.sh sdk cli lint
pytest python/tests
pre-commit:
HOOKS_DIR=$$(git rev-parse --git-path hooks 2>/dev/null || echo ".git/hooks"); \
mkdir -p "$$HOOKS_DIR"; \
ln -sf ../../scripts/pre-commit "$$HOOKS_DIR/pre-commit"; \
echo "✓ Pre-commit hook installed";
# Build sandbox image (uses local config or auto-detection)
sandbox-build:
uv run ./sandbox/run.py --build
# Run sandbox with passthrough (auto-builds if needed)
sandbox-run:
uv run ./sandbox/run.py $(filter-out $@,$(MAKECMDGOALS))
setup:
@echo "Generating local setup script..."
@echo '#!/bin/bash' > setup.sh
@echo '' >> setup.sh
@echo '# Auto-generated by make setup' >> setup.sh
@echo '# This file is local-only and gitignored' >> setup.sh
@echo '' >> setup.sh
@echo 'export AGENTIZE_HOME="$(CURDIR)"' >> setup.sh
@echo 'export PYTHONPATH="$$AGENTIZE_HOME/python:$$PYTHONPATH"' >> setup.sh
@echo 'source "$$AGENTIZE_HOME/src/cli/wt.sh"' >> setup.sh
@echo 'source "$$AGENTIZE_HOME/src/cli/lol.sh"' >> setup.sh
@echo 'source "$$AGENTIZE_HOME/src/cli/acw.sh"' >> setup.sh
@echo '' >> setup.sh
@echo '# Enable zsh completion for wt command' >> setup.sh
@echo 'if [ -n "$$ZSH_VERSION" ]; then # zsh-only setup' >> setup.sh
@echo ' fpath=($$AGENTIZE_HOME/src/completion $$fpath)' >> setup.sh
@echo ' # Re-initialize completion system to pick up new fpath' >> setup.sh
@echo ' if command -v compdef >/dev/null 2>&1; then' >> setup.sh
@echo ' # Already initialized, re-run to pick up new fpath' >> setup.sh
@echo ' autoload -Uz compinit && compinit' >> setup.sh
@echo ' else' >> setup.sh
@echo ' # Not initialized yet, initialize now' >> setup.sh
@echo ' autoload -Uz compinit && compinit' >> setup.sh
@echo ' fi' >> setup.sh
@echo 'fi' >> setup.sh
@chmod +x setup.sh
@echo ""
@echo "✓ Created setup.sh in repository root"
@echo ""
@echo "Usage:"
@echo " 1. Source it now: source setup.sh"
@echo " 2. For persistence, add to your shell RC file:"
@echo " cat setup.sh >> ~/.bashrc # or ~/.zshrc"
vscode-plugin: setup
@echo "Installing VSCode plugin dependencies..."
make -C vscode build
help:
@echo "Available targets:"
@echo " make test - Run all tests (bash only)"
@echo " make test-shells - Run all tests under multiple shells (bash and zsh)"
@echo " make test-sdk - Run SDK template tests"
@echo " make test-cli - Run CLI command tests"
@echo " make test-lint - Run validation and linting tests"
@echo " make test-e2e - Run end-to-end integration tests"
@echo " make test-fast - Run fast tests (sdk + cli + lint)"
@echo " make setup - Generate local setup.sh for development"
@echo " make sandbox-build - Build/rebuild the agentize-sandbox image"
@echo " make sandbox-run - Run sandbox with volume passthrough (auto-builds if needed)"
@echo ""
@echo "Runtime selection (via config file or environment):"
@echo " 1. Create sandbox/agentize.toml with: [container] runtime = 'podman'"
@echo " 2. Or set CONTAINER_RUNTIME=podman"
@echo ""
@echo "SDK usage:"
@echo " lol upgrade # Upgrade agentize installation"
@echo " lol project --create # Create GitHub Projects v2 board"
@echo " lol --help # For all options"