-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
159 lines (124 loc) · 3.24 KB
/
Copy pathinstall.sh
File metadata and controls
159 lines (124 loc) · 3.24 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/usr/bin/env zsh
START_TIME=$(date +%s)
set -e
# Colors
RESET="\033[0m"
BOLD="\033[1m"
BLUE="\033[34m"
GREEN="\033[32m"
YELLOW="\033[33m"
# Logging helpers
section() {
echo ""
echo "${BOLD}${BLUE}==> $1${RESET}"
}
info() {
echo " ${YELLOW}•${RESET} $1"
}
success() {
echo " ${GREEN}✓${RESET} $1"
}
# Package installers
install_if_missing() {
if ! command -v "$1" &>/dev/null; then
info "Installing $1"
brew install "$1"
success "$1 installed"
else
success "$1 already installed"
fi
}
install_cask_if_missing() {
if ! brew list --cask "$1" &>/dev/null; then
info "Installing $1"
brew install --cask "$1"
success "$1 installed"
else
success "$1 already installed"
fi
}
install_npm_global_if_missing() {
if ! npm list -g --depth=0 "$1" &>/dev/null; then
info "Installing npm package $1"
npm install -g "$1"
success "$1 installed"
else
success "$1 already installed"
fi
}
# Homebrew
section "Checking Homebrew"
if ! command -v brew &>/dev/null; then
info "Installing Homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
success "Homebrew installed"
else
success "Homebrew already installed"
fi
info "Updating Homebrew"
brew update
# Core (Node first for npm tools)
section "Installing core tools"
install_if_missing node
# ZSH & Terminal
section "Installing ZSH tools"
install_if_missing starship
install_if_missing zsh-autosuggestions
install_if_missing zsh-completions
install_if_missing zsh-history-substring-search
install_if_missing zsh-syntax-highlighting
install_if_missing fastfetch
install_cask_if_missing ghostty
# Neovim + LSP
section "Installing Neovim tools"
install_if_missing neovim
install_if_missing lua-language-server
install_if_missing stylua
install_if_missing tree-sitter
install_if_missing tree-sitter-cli
install_if_missing fd
install_if_missing ripgrep
install_if_missing tree
section "Installing Neovim language servers"
install_npm_global_if_missing typescript
install_npm_global_if_missing typescript-language-server
install_npm_global_if_missing vscode-json-languageserver
install_npm_global_if_missing vscode-langservers-extracted
install_npm_global_if_missing neovim
# Development Stack
section "Installing development stack"
install_if_missing python@3.14
install_if_missing pipx
install_if_missing ruby
install_if_missing cocoapods
install_if_missing watchman
install_cask_if_missing zulu@17
info "Configuring pipx"
pipx ensurepath
# Expo & CLI tools
section "Installing Expo tools"
install_npm_global_if_missing expo
install_npm_global_if_missing eas-cli
install_npm_global_if_missing commitizen
install_npm_global_if_missing cz-conventional-changelog
install_npm_global_if_missing touch-win
# Done
echo ""
echo "${GREEN}${BOLD}Setup complete.${RESET}"
echo ""
echo "${BOLD}Next steps:${RESET}"
echo " • Restart your terminal or run:"
echo " exec zsh"
echo ""
echo " • Verify installations:"
echo " nvim --version"
echo " node --version"
echo " starship --version"
echo ""
echo " • (Optional) Remove installer:"
echo " rm ./install.sh"
echo ""
END_TIME=$(date +%s)
DURATION=$((END_TIME - START_TIME))
echo "Completed in ${DURATION}s"