-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
80 lines (70 loc) · 1.79 KB
/
setup.sh
File metadata and controls
80 lines (70 loc) · 1.79 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
#!/usr/bin/env bash
set -e
# Git configuration
git config --global push.autoSetupRemote true
# Install Claude Code CLI
echo "Installing Claude Code CLI..."
if ! command -v claude &> /dev/null; then
npm install -g @anthropic-ai/claude-code || echo "Warning: Failed to install Claude Code CLI"
else
echo "Claude CLI already installed"
fi
# Install OpenAI Codex CLI
echo "Installing OpenAI Codex CLI..."
if ! command -v codex &> /dev/null; then
npm install -g @openai/codex || echo "Warning: Failed to install OpenAI Codex CLI"
else
echo "OpenAI Codex CLI already installed"
fi
# Install GitHub Copilot CLI
echo "Installing GitHub Copilot CLI..."
if ! command -v copilot &> /dev/null; then
npm install -g @github/copilot@prerelease || echo "Warning: Failed to install Copilot CLI"
else
echo "Copilot CLI already installed"
fi
# Configure Copilot CLI
echo "Configuring Copilot CLI..."
mkdir -p ~/.copilot
# Enable experimental mode, staff features, and set defaults
cat > ~/.copilot/config.json << 'EOF'
{
"version": 1,
"data": {
"banner": "never",
"theme": "auto"
},
"staff": true,
"experimental": true,
"banner": "never",
"log_level": "all",
"model": "claude-opus-4.6-1m",
"reasoning_effort": "high"
}
EOF
# Configure gopls LSP for Go code intelligence
cat > ~/.copilot/lsp-config.json << 'EOF'
{
"lspServers": {
"go": {
"command": "gopls",
"args": ["serve"],
"fileExtensions": {
".go": "go"
}
}
}
}
EOF
# Ensure gopls is installed
echo "Ensuring gopls is installed..."
if command -v go &> /dev/null; then
if ! command -v gopls &> /dev/null; then
go install golang.org/x/tools/gopls@latest
else
echo "gopls already installed"
fi
else
echo "Go not found, skipping gopls install"
fi
echo "Setup complete!"