-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquickstart.sh
More file actions
executable file
Β·66 lines (59 loc) Β· 2.84 KB
/
quickstart.sh
File metadata and controls
executable file
Β·66 lines (59 loc) Β· 2.84 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
#!/usr/bin/env bash
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Copilot CLI Quick Start β one command, zero experience needed
# Installs GitHub Copilot CLI (if needed), adds the quickstart
# skill, and launches the CLI ready to go.
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
set -euo pipefail
SKILL_REPO="DUBSOpenHub/copilot-cli-quickstart"
SKILL_NAME="copilot-cli-quickstart"
SKILL_DIR="$HOME/.copilot/skills/$SKILL_NAME"
SKILL_URL="https://raw.githubusercontent.com/$SKILL_REPO/main/.github/skills/$SKILL_NAME/SKILL.md"
echo ""
echo "π Copilot CLI Quick Start"
echo "βββββββββββββββββββββββββββββββββββββββββ"
# ββ Step 1: Install Copilot CLI if not present ββββββββββββββ
if command -v copilot >/dev/null 2>&1; then
echo "β
Copilot CLI already installed ($(copilot --version 2>/dev/null || echo 'installed'))"
else
echo "π¦ Installing GitHub Copilot CLI..."
if [[ "$(uname)" == "Darwin" ]] || [[ "$(uname)" == "Linux" ]]; then
if command -v brew >/dev/null 2>&1; then
brew install copilot-cli
else
curl -fsSL https://gh.io/copilot-install | bash
fi
else
echo "β οΈ Windows detected β please install manually:"
echo " winget install GitHub.Copilot"
echo " Then re-run this script."
exit 1
fi
# Verify installation
if ! command -v copilot >/dev/null 2>&1; then
# The install script may have put it in ~/.local/bin
export PATH="$HOME/.local/bin:$PATH"
if ! command -v copilot >/dev/null 2>&1; then
echo "β Installation failed. Try manually: brew install copilot-cli"
exit 1
fi
fi
echo "β
Copilot CLI installed!"
fi
# ββ Step 2: Download the quickstart skill βββββββββββββββββββ
echo "π₯ Adding quickstart skill..."
mkdir -p "$SKILL_DIR"
if curl -fsSL "$SKILL_URL" -o "$SKILL_DIR/SKILL.md"; then
echo "β
Skill installed to $SKILL_DIR"
else
echo "β Failed to download skill. Check your internet connection."
exit 1
fi
# ββ Step 3: Launch ββββββββββββββββββββββββββββββββββββββββββ
echo ""
echo "βββββββββββββββββββββββββββββββββββββββββ"
echo "π Launching Copilot CLI..."
echo " Just type: start tutorial"
echo "βββββββββββββββββββββββββββββββββββββββββ"
echo ""
exec copilot < /dev/tty