-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathquickstart.sh
More file actions
executable file
·88 lines (76 loc) · 2.78 KB
/
quickstart.sh
File metadata and controls
executable file
·88 lines (76 loc) · 2.78 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
#!/usr/bin/env bash
# ⚡ Agent Pulse — One-command installer
# https://github.com/DUBSOpenHub/copilot-cli-agent-pulse
set -euo pipefail
DEST="$HOME/copilot-cli-agent-pulse"
echo ""
echo " ⚡ Agent Pulse — Quick Installer"
echo " ─────────────────────────────────"
echo ""
# Clone or update
if [ -d "$DEST" ]; then
echo " 📂 Updating existing install..."
cd "$DEST" && git pull --quiet
else
echo " 📦 Cloning repository..."
git clone --quiet https://github.com/DUBSOpenHub/copilot-cli-agent-pulse.git "$DEST"
cd "$DEST"
fi
# Create/reuse virtual environment and install deps
VENV="$DEST/.venv"
if [ ! -d "$VENV" ]; then
echo " 🐍 Creating virtual environment..."
python3 -m venv "$VENV"
fi
echo " 📦 Installing dependencies..."
"$VENV/bin/pip" install --quiet -r requirements.txt
echo ""
echo " ✅ Installed to $DEST"
echo ""
# Auto-add shell aliases if not already present
FISH_CONFIG="$HOME/.config/fish/config.fish"
SHELL_RC=""
if [ -f "$HOME/.zshrc" ]; then
SHELL_RC="$HOME/.zshrc"
elif [ -f "$HOME/.bashrc" ]; then
SHELL_RC="$HOME/.bashrc"
fi
ALIASES_ADDED=0
# bash/zsh aliases
if [ -n "$SHELL_RC" ] && ! grep -q 'alias agentpulse=' "$SHELL_RC" 2>/dev/null; then
echo "" >> "$SHELL_RC"
echo "# Agent Pulse — live terminal dashboard" >> "$SHELL_RC"
echo "alias agentpulse='~/copilot-cli-agent-pulse/start.sh'" >> "$SHELL_RC"
echo "alias agentdashboard='~/copilot-cli-agent-pulse/start.sh'" >> "$SHELL_RC"
echo "alias agentpulse-here='~/copilot-cli-agent-pulse/start.sh --here'" >> "$SHELL_RC"
echo " 🔗 Added 'agentpulse', 'agentdashboard', 'agentpulse-here' aliases to $(basename "$SHELL_RC")"
ALIASES_ADDED=1
fi
# fish aliases (works alongside bash/zsh)
if [ -f "$FISH_CONFIG" ] || echo "${SHELL:-}" | grep -q fish; then
mkdir -p "$(dirname "$FISH_CONFIG")"
touch "$FISH_CONFIG"
if ! grep -q 'alias agentpulse' "$FISH_CONFIG" 2>/dev/null; then
echo "" >> "$FISH_CONFIG"
echo "# Agent Pulse — live terminal dashboard" >> "$FISH_CONFIG"
echo "alias agentpulse '~/copilot-cli-agent-pulse/start.sh'" >> "$FISH_CONFIG"
echo "alias agentdashboard '~/copilot-cli-agent-pulse/start.sh'" >> "$FISH_CONFIG"
echo "alias agentpulse-here '~/copilot-cli-agent-pulse/start.sh --here'" >> "$FISH_CONFIG"
echo " 🔗 Added 'agentpulse', 'agentdashboard', 'agentpulse-here' aliases to config.fish"
ALIASES_ADDED=1
fi
fi
if [ "$ALIASES_ADDED" -eq 0 ]; then
echo " 🔗 Aliases already configured."
fi
echo ""
echo " Launch it (opens in a new terminal window):"
echo " agentpulse"
echo " agentdashboard"
echo ""
echo " Run in the current terminal (SSH / tmux / no new window):"
echo " agentpulse --here"
echo ""
echo " Or run directly:"
echo " $DEST/start.sh"
echo ""