Repository navigation
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·48 lines (42 loc) · 1.4 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·48 lines (42 loc) · 1.4 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
#!/bin/bash
echo "==================================="
echo "Gemini UI Design Server Setup"
echo "==================================="
echo ""
# Check if API key is provided
if [ -z "$1" ]; then
echo "Usage: ./setup.sh YOUR_GEMINI_API_KEY"
echo ""
echo "Get your API key from: https://makersuite.google.com/app/apikey"
exit 1
fi
API_KEY="$1"
INSTALL_DIR="$(cd "$(dirname "$0")" && pwd)"
# Create Warp MCP config directory if it doesn't exist
mkdir -p ~/.config/warp
# Check if mcp.json exists
if [ -f ~/.config/warp/mcp.json ]; then
echo "⚠️ Warp MCP config already exists at ~/.config/warp/mcp.json"
echo "Please manually add the following configuration:"
echo ""
cat "$INSTALL_DIR/warp-mcp-config.json" | sed "s|\${HOME}|$HOME|g" | sed "s/PASTE_YOUR_API_KEY_HERE/$API_KEY/"
echo ""
else
# Create new config
cat "$INSTALL_DIR/warp-mcp-config.json" | sed "s|\${HOME}|$HOME|g" | sed "s/PASTE_YOUR_API_KEY_HERE/$API_KEY/" > ~/.config/warp/mcp.json
echo "✓ Created Warp MCP configuration at ~/.config/warp/mcp.json"
fi
echo ""
echo "==================================="
echo "Setup Complete!"
echo "==================================="
echo ""
echo "Next steps:"
echo "1. Restart Warp terminal"
echo "2. Your Gemini MCP server is now available"
echo ""
echo "Test the server manually:"
echo "export GEMINI_API_KEY=\"$API_KEY\""
echo "cd \"$INSTALL_DIR\""
echo "npm start"
echo ""