@@ -60,14 +60,27 @@ echo " DYLD_LIBRARY_PATH: /opt/homebrew/opt/faiss/lib"
6060echo " MACOSX_DEPLOYMENT_TARGET: 11.0"
6161echo " "
6262
63- # Install CodeGraph with all revolutionary features
64- echo -e " ${BLUE} 🚀 Installing CodeGraph Universal AI Development Platform...${NC} "
65- echo " ⏱️ This may take 5-10 minutes depending on your system..."
63+ FEATURE_FLAGS=" ai-enhanced,qwen-integration,embeddings,faiss,embeddings-ollama,codegraph-vector/onnx"
64+ INSTALL_DIR=" ${CODEGRAPH_INSTALL_DIR:- $HOME / .local/ bin} "
65+
66+ echo -e " ${BLUE} 🚀 Building CodeGraph Universal AI Development Platform...${NC} "
67+ echo " ⏱️ This may take a few minutes depending on your system..."
68+ echo " Features: ${FEATURE_FLAGS} "
6669echo " "
6770
68- cargo install --path crates/codegraph-mcp \
69- --features " embeddings,codegraph-vector/onnx,faiss,embeddings-ollama,qwen-integration,ai-enhanced" \
70- --force
71+ cargo build --release \
72+ --package codegraph-mcp \
73+ --bin codegraph \
74+ --features " ${FEATURE_FLAGS} " || {
75+ echo " "
76+ echo -e " ${RED} ❌ Build failed. Please review the error log above.${NC} "
77+ exit 1
78+ }
79+
80+ echo -e " ${BLUE} 📦 Installing binary to ${INSTALL_DIR}${NC} "
81+ mkdir -p " ${INSTALL_DIR} "
82+ cp -f " $( pwd) /target/release/codegraph" " ${INSTALL_DIR} /codegraph"
83+ chmod +x " ${INSTALL_DIR} /codegraph"
7184
7285if [ $? -eq 0 ]; then
7386 echo " "
@@ -85,7 +98,8 @@ if [ $? -eq 0 ]; then
8598 echo " 1. Navigate to any project directory"
8699 echo " 2. Run: ${GREEN} codegraph init .${NC} "
87100 echo " 3. Run: ${GREEN} codegraph index .${NC} (auto-detects all 11 languages)"
88- echo " 4. Use CodeGraph tools in Claude Code!"
101+ echo " 4. Ensure ${INSTALL_DIR} is on your PATH (e.g. export PATH=\" ${INSTALL_DIR} :4PATH\" )"
102+ echo " 5. Use CodeGraph tools in Claude Code!"
89103 echo " "
90104 echo -e " ${BLUE} 🔗 MCP Configuration:${NC} "
91105 echo " Global config works from any directory - no manual setup needed!"
125139 echo " "
126140 echo " Please resolve the issue and run this script again."
127141 exit 1
128- fi
142+ fi
0 commit comments