From 87c5d6761809aeb6d221c45694db9dd95c8ae0b2 Mon Sep 17 00:00:00 2001 From: Niladri Das Date: Fri, 16 Jan 2026 15:57:22 +0530 Subject: [PATCH 01/11] feat: add safe homebrew scripts directory Provides automated scripts for updating, installing tools/languages/utilities, checking outdated packages, cleanup, and a minimal example to ensure safe dev environment management. --- homebrew-scripts/README.md | 27 ++++++++++++++++++++++ homebrew-scripts/check-outdated.sh | 11 +++++++++ homebrew-scripts/cleanup-brew.sh | 16 +++++++++++++ homebrew-scripts/install-common-tools.sh | 29 ++++++++++++++++++++++++ homebrew-scripts/install-languages.sh | 15 ++++++++++++ homebrew-scripts/install-utilities.sh | 17 ++++++++++++++ homebrew-scripts/minimal-install.sh | 17 ++++++++++++++ homebrew-scripts/update-brew.sh | 14 ++++++++++++ 8 files changed, 146 insertions(+) create mode 100644 homebrew-scripts/README.md create mode 100755 homebrew-scripts/check-outdated.sh create mode 100755 homebrew-scripts/cleanup-brew.sh create mode 100755 homebrew-scripts/install-common-tools.sh create mode 100755 homebrew-scripts/install-languages.sh create mode 100755 homebrew-scripts/install-utilities.sh create mode 100755 homebrew-scripts/minimal-install.sh create mode 100755 homebrew-scripts/update-brew.sh diff --git a/homebrew-scripts/README.md b/homebrew-scripts/README.md new file mode 100644 index 0000000..520793b --- /dev/null +++ b/homebrew-scripts/README.md @@ -0,0 +1,27 @@ +# Homebrew Scripts + +Opinionated but safe Homebrew automation scripts for macOS. + +These scripts wrap common Homebrew operations into repeatable, +readable shell commands. + +## Included scripts + +| Script | Purpose | +|------|--------| +| update-brew.sh | Update Homebrew and upgrade all packages | +| check-outdated.sh | Show outdated formulae | +| cleanup-brew.sh | Remove old versions and unused deps | +| install-common-tools.sh | Install common dev tools | +| install-languages.sh | Install additional languages | +| install-utilities.sh | Install CLI utilities | +| minimal-install.sh | Minimal example (Git only) | + +## Running + +```bash +chmod +x *.sh +./update-brew.sh +``` + +Homebrew must be installed beforehand. diff --git a/homebrew-scripts/check-outdated.sh b/homebrew-scripts/check-outdated.sh new file mode 100755 index 0000000..1fa705d --- /dev/null +++ b/homebrew-scripts/check-outdated.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Safe Homebrew check script +# Lists outdated packages + +set -e + +echo "Checking for outdated Homebrew packages..." +brew outdated + +echo "Check completed. Run update-brew.sh to upgrade." diff --git a/homebrew-scripts/cleanup-brew.sh b/homebrew-scripts/cleanup-brew.sh new file mode 100755 index 0000000..b1c8d98 --- /dev/null +++ b/homebrew-scripts/cleanup-brew.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Safe Homebrew cleanup script +# Removes old versions and unused dependencies + +set -e + +echo "Cleaning up Homebrew..." + +# Remove old versions of formulae +brew cleanup + +# Remove formulae that are no longer needed +brew autoremove + +echo "Homebrew cleanup completed successfully." diff --git a/homebrew-scripts/install-common-tools.sh b/homebrew-scripts/install-common-tools.sh new file mode 100755 index 0000000..5e884d0 --- /dev/null +++ b/homebrew-scripts/install-common-tools.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Safe Homebrew install script for common development tools +# Installs frequently used packages for development + +set -e + +echo "Installing common development tools via Homebrew..." + +# Version control +brew install git + +# Programming languages and runtimes +brew install python@3.12 +brew install node +brew install rust +brew install go + +# Package managers and tools +brew install npm +brew install yarn + +# Development utilities +brew install jq +brew install tree +brew install wget + +echo "Common development tools installed successfully." +echo "Note: Python is installed as python@3.12. Use 'python3' to run it." diff --git a/homebrew-scripts/install-languages.sh b/homebrew-scripts/install-languages.sh new file mode 100755 index 0000000..fe84d2a --- /dev/null +++ b/homebrew-scripts/install-languages.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Safe Homebrew install script for programming languages +# Installs additional programming languages and runtimes + +set -e + +echo "Installing additional programming languages via Homebrew..." + +brew install ruby +brew install php +brew install lua +brew install perl + +echo "Additional programming languages installed successfully." diff --git a/homebrew-scripts/install-utilities.sh b/homebrew-scripts/install-utilities.sh new file mode 100755 index 0000000..e5eecef --- /dev/null +++ b/homebrew-scripts/install-utilities.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Safe Homebrew install script for common utilities +# Installs useful command-line utilities + +set -e + +echo "Installing common utilities via Homebrew..." + +brew install htop +brew install tmux +brew install vim +brew install neovim +brew install curl +brew install git-lfs + +echo "Common utilities installed successfully." diff --git a/homebrew-scripts/minimal-install.sh b/homebrew-scripts/minimal-install.sh new file mode 100755 index 0000000..46eb89b --- /dev/null +++ b/homebrew-scripts/minimal-install.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Minimal Homebrew Install Script +# This script demonstrates a basic, safe Homebrew installation example. +# It installs only the essential Git version control system, which is fundamental for development workflows. +# Unlike the other scripts that install multiple packages, this focuses on a single, core tool to illustrate minimal dependency management. +# In software engineering, minimalism in tooling reduces complexity, potential conflicts, and maintenance overhead. +# By starting with Git, this script ensures version control is available before adding more tools, following the principle of progressive enhancement. +# Reference: Homebrew's philosophy emphasizes simplicity and safety, aligning with this minimal approach to avoid overwhelming new users. +# This prevents "bandwidth noise" by providing a focused, educational example rather than a bloated installation. + +set -e + +echo "Installing minimal essential tool: Git" +brew install git + +echo "Minimal installation completed. Git is now available for version control." diff --git a/homebrew-scripts/update-brew.sh b/homebrew-scripts/update-brew.sh new file mode 100755 index 0000000..38382e9 --- /dev/null +++ b/homebrew-scripts/update-brew.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +# Safe Homebrew update script +# Updates Homebrew formulae and upgrades installed packages + +set -e + +echo "Updating Homebrew..." +brew update + +echo "Upgrading installed packages..." +brew upgrade + +echo "Homebrew update and upgrade completed successfully." From 26ada77ed7903f92947179f5555b4e78caee8f9d Mon Sep 17 00:00:00 2001 From: niladri das <125604915+bniladridas@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:08:44 +0530 Subject: [PATCH 02/11] Update homebrew-scripts/check-outdated.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- homebrew-scripts/check-outdated.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homebrew-scripts/check-outdated.sh b/homebrew-scripts/check-outdated.sh index 1fa705d..6d2bcdb 100755 --- a/homebrew-scripts/check-outdated.sh +++ b/homebrew-scripts/check-outdated.sh @@ -3,7 +3,7 @@ # Safe Homebrew check script # Lists outdated packages -set -e +set -euo pipefail echo "Checking for outdated Homebrew packages..." brew outdated From a6fc591920093af4967d8debff5e09fc5e7c6e94 Mon Sep 17 00:00:00 2001 From: niladri das <125604915+bniladridas@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:08:54 +0530 Subject: [PATCH 03/11] Update homebrew-scripts/cleanup-brew.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- homebrew-scripts/cleanup-brew.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homebrew-scripts/cleanup-brew.sh b/homebrew-scripts/cleanup-brew.sh index b1c8d98..51e0013 100755 --- a/homebrew-scripts/cleanup-brew.sh +++ b/homebrew-scripts/cleanup-brew.sh @@ -3,7 +3,7 @@ # Safe Homebrew cleanup script # Removes old versions and unused dependencies -set -e +set -euo pipefail echo "Cleaning up Homebrew..." From 6531c5ae65181b0275d1370587a135526b680576 Mon Sep 17 00:00:00 2001 From: niladri das <125604915+bniladridas@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:09:04 +0530 Subject: [PATCH 04/11] Update homebrew-scripts/install-common-tools.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- homebrew-scripts/install-common-tools.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homebrew-scripts/install-common-tools.sh b/homebrew-scripts/install-common-tools.sh index 5e884d0..2a639f3 100755 --- a/homebrew-scripts/install-common-tools.sh +++ b/homebrew-scripts/install-common-tools.sh @@ -3,7 +3,7 @@ # Safe Homebrew install script for common development tools # Installs frequently used packages for development -set -e +set -euo pipefail echo "Installing common development tools via Homebrew..." From 1c13f53a6aff1eb15e96f8dcec266111f848e856 Mon Sep 17 00:00:00 2001 From: niladri das <125604915+bniladridas@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:09:15 +0530 Subject: [PATCH 05/11] Update homebrew-scripts/install-common-tools.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- homebrew-scripts/install-common-tools.sh | 28 ++++++++++-------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/homebrew-scripts/install-common-tools.sh b/homebrew-scripts/install-common-tools.sh index 2a639f3..7ae4c6b 100755 --- a/homebrew-scripts/install-common-tools.sh +++ b/homebrew-scripts/install-common-tools.sh @@ -7,23 +7,17 @@ set -euo pipefail echo "Installing common development tools via Homebrew..." -# Version control -brew install git - -# Programming languages and runtimes -brew install python@3.12 -brew install node -brew install rust -brew install go - -# Package managers and tools -brew install npm -brew install yarn - -# Development utilities -brew install jq -brew install tree -brew install wget +# Version control, languages, runtimes, and tools +brew install \ + git \ + python@3.12 \ + node \ + rust \ + go \ + yarn \ + jq \ + tree \ + wget echo "Common development tools installed successfully." echo "Note: Python is installed as python@3.12. Use 'python3' to run it." From 4b2753ae0c231caaa0f752e2ded014add7d1e7e7 Mon Sep 17 00:00:00 2001 From: niladri das <125604915+bniladridas@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:09:23 +0530 Subject: [PATCH 06/11] Update homebrew-scripts/install-languages.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- homebrew-scripts/install-languages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homebrew-scripts/install-languages.sh b/homebrew-scripts/install-languages.sh index fe84d2a..7a3615e 100755 --- a/homebrew-scripts/install-languages.sh +++ b/homebrew-scripts/install-languages.sh @@ -3,7 +3,7 @@ # Safe Homebrew install script for programming languages # Installs additional programming languages and runtimes -set -e +set -euo pipefail echo "Installing additional programming languages via Homebrew..." From 2e636f3d5c6b992e7b47e49c106e52ade00a87f3 Mon Sep 17 00:00:00 2001 From: niladri das <125604915+bniladridas@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:09:33 +0530 Subject: [PATCH 07/11] Update homebrew-scripts/install-languages.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- homebrew-scripts/install-languages.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homebrew-scripts/install-languages.sh b/homebrew-scripts/install-languages.sh index 7a3615e..0d03794 100755 --- a/homebrew-scripts/install-languages.sh +++ b/homebrew-scripts/install-languages.sh @@ -7,9 +7,9 @@ set -euo pipefail echo "Installing additional programming languages via Homebrew..." -brew install ruby -brew install php -brew install lua -brew install perl +brew install ruby \ + php \ + lua \ + perl echo "Additional programming languages installed successfully." From 10973e0bbb476fff780feaa116a2e56a95843855 Mon Sep 17 00:00:00 2001 From: niladri das <125604915+bniladridas@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:09:41 +0530 Subject: [PATCH 08/11] Update homebrew-scripts/install-utilities.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- homebrew-scripts/install-utilities.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homebrew-scripts/install-utilities.sh b/homebrew-scripts/install-utilities.sh index e5eecef..b46b9ee 100755 --- a/homebrew-scripts/install-utilities.sh +++ b/homebrew-scripts/install-utilities.sh @@ -3,7 +3,7 @@ # Safe Homebrew install script for common utilities # Installs useful command-line utilities -set -e +set -euo pipefail echo "Installing common utilities via Homebrew..." From ddf2b73426eed903ae9c9542d207984c759387d3 Mon Sep 17 00:00:00 2001 From: niladri das <125604915+bniladridas@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:09:50 +0530 Subject: [PATCH 09/11] Update homebrew-scripts/install-utilities.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- homebrew-scripts/install-utilities.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/homebrew-scripts/install-utilities.sh b/homebrew-scripts/install-utilities.sh index b46b9ee..d2e4ec2 100755 --- a/homebrew-scripts/install-utilities.sh +++ b/homebrew-scripts/install-utilities.sh @@ -7,11 +7,11 @@ set -euo pipefail echo "Installing common utilities via Homebrew..." -brew install htop -brew install tmux -brew install vim -brew install neovim -brew install curl -brew install git-lfs +brew install htop \ + tmux \ + vim \ + neovim \ + curl \ + git-lfs echo "Common utilities installed successfully." From 022dea42b649e67ce50bd097410ccacd84a89cdb Mon Sep 17 00:00:00 2001 From: niladri das <125604915+bniladridas@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:09:58 +0530 Subject: [PATCH 10/11] Update homebrew-scripts/minimal-install.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- homebrew-scripts/minimal-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homebrew-scripts/minimal-install.sh b/homebrew-scripts/minimal-install.sh index 46eb89b..f6273b0 100755 --- a/homebrew-scripts/minimal-install.sh +++ b/homebrew-scripts/minimal-install.sh @@ -9,7 +9,7 @@ # Reference: Homebrew's philosophy emphasizes simplicity and safety, aligning with this minimal approach to avoid overwhelming new users. # This prevents "bandwidth noise" by providing a focused, educational example rather than a bloated installation. -set -e +set -euo pipefail echo "Installing minimal essential tool: Git" brew install git From 3232e498530b1fef8d4af543e98ea81923d48738 Mon Sep 17 00:00:00 2001 From: niladri das <125604915+bniladridas@users.noreply.github.com> Date: Fri, 16 Jan 2026 16:10:07 +0530 Subject: [PATCH 11/11] Update homebrew-scripts/update-brew.sh Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- homebrew-scripts/update-brew.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homebrew-scripts/update-brew.sh b/homebrew-scripts/update-brew.sh index 38382e9..117ea4a 100755 --- a/homebrew-scripts/update-brew.sh +++ b/homebrew-scripts/update-brew.sh @@ -3,7 +3,7 @@ # Safe Homebrew update script # Updates Homebrew formulae and upgrades installed packages -set -e +set -euo pipefail echo "Updating Homebrew..." brew update