-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (64 loc) · 2.18 KB
/
Copy pathMakefile
File metadata and controls
78 lines (64 loc) · 2.18 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
.PHONY: install install-dev uninstall clean test help
help:
@echo "llm-code-docs - Documentation Search Assistant"
@echo ""
@echo "Available targets:"
@echo " install Install llm-code-docs CLI and API"
@echo " install-dev Install in development mode with dev dependencies"
@echo " uninstall Uninstall llm-code-docs"
@echo " clean Remove build artifacts"
@echo " test Run tests"
@echo " services Start all services (OpenSearch, TEI, API, watcher)"
@echo " stop-services Stop all services"
@echo ""
@echo "Usage:"
@echo " make install # Install via uv"
@echo " llm-code-docs health # Check API status"
@echo " llm-code-docs search QUERY"
install:
@echo "Installing llm-code-docs..."
uv pip install .
@echo ""
@echo "✓ Installed! Try: llm-code-docs health"
install-dev:
@echo "Installing llm-code-docs in development mode..."
uv pip install -e ".[dev]"
@echo ""
@echo "✓ Installed in dev mode!"
uninstall:
uv pip uninstall llm-code-docs
clean:
rm -rf build/ dist/ *.egg-info .pytest_cache __pycache__
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
test:
pytest tests/ -v
# Service management
services:
@echo "Starting llm-code-docs services..."
./scripts/start_opensearch.sh
./scripts/start_tei.sh
./scripts/start_watcher.sh
systemctl --user start llm-code-docs-api.service
@echo "✓ All services started"
stop-services:
@echo "Stopping llm-code-docs services..."
./scripts/stop_opensearch.sh || true
./scripts/stop_tei.sh || true
systemctl --user stop llm-code-docs-watcher.service || true
systemctl --user stop llm-code-docs-api.service || true
@echo "✓ All services stopped"
# Index management
index-docs:
USE_GPU_CLUSTER=true python -m search.cli index --rebuild
index-folders:
USE_GPU_CLUSTER=true python -m search.cli index --folders
# API shortcuts
api-start:
systemctl --user start llm-code-docs-api.service
api-stop:
systemctl --user stop llm-code-docs-api.service
api-status:
systemctl --user status llm-code-docs-api.service --no-pager
api-logs:
tail -f .api.log