-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
72 lines (59 loc) · 2.02 KB
/
install.sh
File metadata and controls
72 lines (59 loc) · 2.02 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
#!/bin/bash
# CAP Development Tools Installer
# Installs semantic search and smart test tools for Claude Code
set -e
VERSION="1.1.0"
INSTALL_DIR="$HOME/.cap-tools"
REPO_URL="https://raw.githubusercontent.com/Akhetonics/python-dev-tools"
BRANCH="main"
echo "🔧 Python Development Tools Installer v$VERSION"
echo ""
# Create install directory
mkdir -p "$INSTALL_DIR"
echo "📦 Installing tools to $INSTALL_DIR..."
# Download tools from new repository
curl -sSL "$REPO_URL/$BRANCH/semantic_search.py" -o "$INSTALL_DIR/semantic_search.py"
curl -sSL "$REPO_URL/$BRANCH/smart_test.py" -o "$INSTALL_DIR/smart_test.py"
curl -sSL "$REPO_URL/$BRANCH/README.md" -o "$INSTALL_DIR/README.md"
# Make executable
chmod +x "$INSTALL_DIR/semantic_search.py"
chmod +x "$INSTALL_DIR/smart_test.py"
echo "✅ Tools installed!"
echo ""
# Check for Python dependencies
echo "🐍 Checking Python dependencies..."
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 not found! Please install Python 3.8+"
exit 1
fi
# Check if in a venv or if python-dotenv is installed globally
if python3 -c "import dotenv" 2>/dev/null; then
echo "✅ python-dotenv found"
else
echo "⚠️ python-dotenv not found"
echo " Install in your project venv: pip install python-dotenv"
fi
if python3 -c "import openai" 2>/dev/null; then
echo "✅ openai package found"
else
echo "⚠️ openai package not found"
echo " Install in your project venv: pip install openai"
fi
echo ""
echo "📝 Setup slash commands in your project:"
echo ""
echo " cd your-project"
echo " mkdir -p .claude/commands"
echo " cp $INSTALL_DIR/../examples/commands/*.md .claude/commands/"
echo ""
echo "📚 Documentation: $INSTALL_DIR/README.md"
echo ""
echo "🎉 Installation complete!"
echo ""
echo "Usage:"
echo " Semantic search: python3 $INSTALL_DIR/semantic_search.py \"query\""
echo " Smart test: python3 $INSTALL_DIR/smart_test.py [filter]"
echo ""
echo "Or use slash commands in Claude Code:"
echo " /search-code <query>"
echo " /test [filter]"