1+ #! /bin/bash
2+
3+ # OSVMarchi Modern Development Tools Installer
4+ # Installs cutting-edge development tools and modern utilities
5+
6+ set -euo pipefail
7+
8+ # Colors for output
9+ RED=' \033[0;31m'
10+ GREEN=' \033[0;32m'
11+ BLUE=' \033[0;34m'
12+ YELLOW=' \033[1;33m'
13+ NC=' \033[0m' # No Color
14+
15+ log_info () {
16+ echo -e " ${BLUE} [INFO]${NC} $1 "
17+ }
18+
19+ log_success () {
20+ echo -e " ${GREEN} [SUCCESS]${NC} $1 "
21+ }
22+
23+ log_warning () {
24+ echo -e " ${YELLOW} [WARNING]${NC} $1 "
25+ }
26+
27+ log_error () {
28+ echo -e " ${RED} [ERROR]${NC} $1 "
29+ }
30+
31+ # Check if yay is available
32+ check_yay () {
33+ if ! command -v yay & > /dev/null; then
34+ log_error " yay AUR helper is required but not installed"
35+ log_info " Please install yay first: pacman -S yay"
36+ exit 1
37+ fi
38+ }
39+
40+ # Install Modern Text Editors and IDEs
41+ install_modern_editors () {
42+ log_info " Installing Modern Text Editors and IDEs..."
43+
44+ local editor_packages=(
45+ " cursor-bin" # AI-powered code editor
46+ " zed" # High-performance code editor
47+ " helix" # Modal text editor with built-in LSP
48+ " lapce-bin" # Lightning-fast Rust-based editor
49+ " fleet-bin" # JetBrains next-gen IDE
50+ )
51+
52+ for pkg in " ${editor_packages[@]} " ; do
53+ log_info " Installing $pkg ..."
54+ if yay -S --noconfirm --needed " $pkg " ; then
55+ log_success " $pkg installed successfully"
56+ else
57+ log_warning " Failed to install $pkg , continuing..."
58+ fi
59+ done
60+ }
61+
62+ # Install Advanced Terminal Tools
63+ install_terminal_tools () {
64+ log_info " Installing Advanced Terminal Tools..."
65+
66+ local terminal_packages=(
67+ " starship" # Cross-shell prompt (already installed)
68+ " zoxide" # Smarter cd command
69+ " procs" # Modern replacement for ps
70+ " bottom" # Alternative to htop/top
71+ " hyperfine" # Command-line benchmarking tool (already installed)
72+ " gping" # Ping with graph
73+ " grex" # Generate regex from examples
74+ " choose" # Alternative to cut/awk
75+ " sd" # Intuitive find & replace CLI
76+ )
77+
78+ for pkg in " ${terminal_packages[@]} " ; do
79+ log_info " Installing $pkg ..."
80+ if yay -S --noconfirm --needed " $pkg " ; then
81+ log_success " $pkg installed successfully"
82+ else
83+ log_warning " Failed to install $pkg , continuing..."
84+ fi
85+ done
86+ }
87+
88+ # Install Modern Build Tools and Language Servers
89+ install_build_tools () {
90+ log_info " Installing Modern Build Tools and Language Servers..."
91+
92+ local build_packages=(
93+ " bazel" # Fast, scalable build system
94+ " ninja" # Small build system focused on speed
95+ " sccache" # Compilation caching
96+ " ccache" # Compiler cache
97+ " typescript-language-server" # TypeScript LSP
98+ " pyright" # Python language server
99+ " gopls" # Go language server
100+ " taplo-cli" # TOML language server
101+ " yaml-language-server" # YAML language server
102+ )
103+
104+ for pkg in " ${build_packages[@]} " ; do
105+ log_info " Installing $pkg ..."
106+ if yay -S --noconfirm --needed " $pkg " ; then
107+ log_success " $pkg installed successfully"
108+ else
109+ log_warning " Failed to install $pkg , continuing..."
110+ fi
111+ done
112+ }
113+
114+ # Install Git and Development Workflow Tools
115+ install_git_tools () {
116+ log_info " Installing Git and Development Workflow Tools..."
117+
118+ local git_packages=(
119+ " lazygit" # Terminal UI for git (already installed)
120+ " gitui" # Terminal UI for git commands
121+ " gh" # GitHub CLI (already installed)
122+ " glab" # GitLab CLI
123+ " git-cliff" # Changelog generator
124+ " conventional-commits" # Conventional commits tool
125+ " cocogitto" # Conventional commits toolchain
126+ )
127+
128+ for pkg in " ${git_packages[@]} " ; do
129+ log_info " Installing $pkg ..."
130+ if yay -S --noconfirm --needed " $pkg " ; then
131+ log_success " $pkg installed successfully"
132+ else
133+ log_warning " Failed to install $pkg , continuing..."
134+ fi
135+ done
136+ }
137+
138+ # Install Performance and Debugging Tools
139+ install_perf_tools () {
140+ log_info " Installing Performance and Debugging Tools..."
141+
142+ local perf_packages=(
143+ " flamegraph" # Flame graph profiler
144+ " bandwhich" # Network utilization by process
145+ " dust" # Disk usage analyzer (already installed)
146+ " dua-cli" # Disk usage analyzer
147+ " oha" # HTTP load testing tool
148+ " drill" # HTTP load testing
149+ " hey" # HTTP load generator
150+ )
151+
152+ for pkg in " ${perf_packages[@]} " ; do
153+ log_info " Installing $pkg ..."
154+ if yay -S --noconfirm --needed " $pkg " ; then
155+ log_success " $pkg installed successfully"
156+ else
157+ log_warning " Failed to install $pkg , continuing..."
158+ fi
159+ done
160+ }
161+
162+ # Install Cloud and DevOps Tools
163+ install_cloud_tools () {
164+ log_info " Installing Cloud and DevOps Tools..."
165+
166+ local cloud_packages=(
167+ " terraform" # Infrastructure as code
168+ " helm" # Kubernetes package manager
169+ " k9s" # Kubernetes CLI manager
170+ " kubectx" # Kubernetes context switcher
171+ " stern" # Multi-pod log tailing
172+ " dive" # Docker image layer explorer
173+ " ctop" # Container metrics
174+ " lazydocker" # Docker TUI (already installed)
175+ )
176+
177+ for pkg in " ${cloud_packages[@]} " ; do
178+ log_info " Installing $pkg ..."
179+ if yay -S --noconfirm --needed " $pkg " ; then
180+ log_success " $pkg installed successfully"
181+ else
182+ log_warning " Failed to install $pkg , continuing..."
183+ fi
184+ done
185+ }
186+
187+ # Show installation summary
188+ show_summary () {
189+ echo
190+ log_success " Modern Development Tools Installation Complete!"
191+ echo
192+ log_info " Installed Modern Editors:"
193+ log_info " • cursor-bin - AI-powered code editor"
194+ log_info " • zed - High-performance code editor"
195+ log_info " • helix - Modal editor with built-in LSP"
196+ log_info " • lapce-bin - Lightning-fast Rust editor"
197+ log_info " • vscode - Visual Studio Code (already installed)"
198+ log_info " • neovim - Modern Vim (already installed)"
199+ echo
200+ log_info " Advanced Terminal Tools:"
201+ log_info " • zoxide - Smarter cd command"
202+ log_info " • procs - Modern ps replacement"
203+ log_info " • bottom - Advanced system monitor"
204+ log_info " • gping - Ping with graph"
205+ log_info " • sd - Intuitive find & replace"
206+ echo
207+ log_info " Build Tools & Language Servers:"
208+ log_info " • bazel - Fast, scalable build system"
209+ log_info " • sccache - Compilation caching"
210+ log_info " • rust-analyzer - Rust LSP (already installed)"
211+ log_info " • typescript-language-server - TypeScript LSP"
212+ log_info " • pyright - Python language server"
213+ echo
214+ log_info " Git & Workflow Tools:"
215+ log_info " • gitui - Terminal UI for git"
216+ log_info " • glab - GitLab CLI"
217+ log_info " • git-cliff - Changelog generator"
218+ log_info " • cocogitto - Conventional commits"
219+ echo
220+ log_info " Performance & Debugging:"
221+ log_info " • flamegraph - Flame graph profiler"
222+ log_info " • bandwhich - Network utilization"
223+ log_info " • oha - HTTP load testing"
224+ log_info " • perf - Performance profiling (already installed)"
225+ echo
226+ log_info " Cloud & DevOps:"
227+ log_info " • terraform - Infrastructure as code"
228+ log_info " • helm - Kubernetes package manager"
229+ log_info " • k9s - Kubernetes CLI manager"
230+ log_info " • dive - Docker image explorer"
231+ echo
232+ log_warning " Note: Some tools may require additional setup or configuration"
233+ log_info " Check individual tool documentation for usage details"
234+ }
235+
236+ # Main installation function
237+ main () {
238+ log_info " Starting Modern Development Tools Installation..."
239+ echo
240+
241+ # Check prerequisites
242+ check_yay
243+
244+ # Install in categories
245+ install_modern_editors
246+ echo
247+ install_terminal_tools
248+ echo
249+ install_build_tools
250+ echo
251+ install_git_tools
252+ echo
253+ install_perf_tools
254+ echo
255+ install_cloud_tools
256+ echo
257+
258+ # Update package database
259+ log_info " Updating package database..."
260+ sudo updatedb
261+
262+ # Show summary
263+ show_summary
264+ }
265+
266+ # Show help
267+ show_help () {
268+ cat << EOF
269+ OSVMarchi Modern Development Tools Installer
270+
271+ This script installs cutting-edge development tools and modern utilities.
272+
273+ USAGE:
274+ $0 [OPTIONS]
275+
276+ OPTIONS:
277+ -h, --help Show this help message
278+
279+ TOOLS INSTALLED:
280+ Modern Editors:
281+ • cursor-bin - AI-powered code editor
282+ • zed - High-performance code editor
283+ • helix - Modal editor with built-in LSP
284+ • lapce-bin - Lightning-fast Rust editor
285+ • fleet-bin - JetBrains next-gen IDE
286+
287+ Terminal Tools:
288+ • zoxide - Smarter cd command
289+ • procs - Modern ps replacement
290+ • bottom - Advanced system monitor
291+ • gping - Ping with graph
292+ • sd - Intuitive find & replace
293+
294+ Build Tools:
295+ • bazel - Fast, scalable build system
296+ • sccache - Compilation caching
297+ • Various language servers (TypeScript, Python, Go, etc.)
298+
299+ Git & Workflow:
300+ • gitui - Terminal UI for git
301+ • glab - GitLab CLI
302+ • git-cliff - Changelog generator
303+
304+ Performance:
305+ • flamegraph - Flame graph profiler
306+ • bandwhich - Network utilization
307+ • oha - HTTP load testing
308+
309+ Cloud & DevOps:
310+ • terraform - Infrastructure as code
311+ • helm - Kubernetes package manager
312+ • k9s - Kubernetes CLI manager
313+
314+ EXAMPLES:
315+ $0 # Install all modern dev tools
316+ $0 --help # Show this help
317+
318+ EOF
319+ }
320+
321+ # Parse command line arguments
322+ case " ${1:- } " in
323+ -h|--help)
324+ show_help
325+ exit 0
326+ ;;
327+ " " )
328+ main
329+ ;;
330+ * )
331+ log_error " Unknown option: $1 "
332+ echo " Use '$0 --help' for usage information"
333+ exit 1
334+ ;;
335+ esac
0 commit comments