-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add homebrew automation scripts for macOS #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
87c5d67
26ada77
a6fc591
6531c5a
1c13f53
4b2753a
2e636f3
10973e0
ddf2b73
022dea4
3232e49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Safe Homebrew cleanup script | ||
| # Removes old versions and unused dependencies | ||
|
|
||
| set -e | ||
bniladridas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 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." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Safe Homebrew install script for common development tools | ||
| # Installs frequently used packages for development | ||
|
|
||
| set -e | ||
bniladridas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 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 | ||
bniladridas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| echo "Common development tools installed successfully." | ||
| echo "Note: Python is installed as python@3.12. Use 'python3' to run it." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Safe Homebrew install script for programming languages | ||
| # Installs additional programming languages and runtimes | ||
|
|
||
| set -e | ||
bniladridas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| echo "Installing additional programming languages via Homebrew..." | ||
|
|
||
| brew install ruby | ||
| brew install php | ||
| brew install lua | ||
| brew install perl | ||
bniladridas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| echo "Additional programming languages installed successfully." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Safe Homebrew install script for common utilities | ||
| # Installs useful command-line utilities | ||
|
|
||
| set -e | ||
bniladridas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 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 | ||
bniladridas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| echo "Common utilities installed successfully." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
bniladridas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| echo "Installing minimal essential tool: Git" | ||
| brew install git | ||
|
|
||
| echo "Minimal installation completed. Git is now available for version control." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Safe Homebrew update script | ||
| # Updates Homebrew formulae and upgrades installed packages | ||
|
|
||
| set -e | ||
bniladridas marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| echo "Updating Homebrew..." | ||
| brew update | ||
|
|
||
| echo "Upgrading installed packages..." | ||
| brew upgrade | ||
|
|
||
| echo "Homebrew update and upgrade completed successfully." | ||
Uh oh!
There was an error while loading. Please reload this page.