Shell Scripts (macOS)
April 12, 2026 ยท View on GitHub
Practical command-line helpers used on macOS development machines.
Quick Start
chmod +x ./*.sh
./syntaxchecker.sh
./brew_check.sh --help
./docker_tools.sh --help
./wifi_tools.sh --help
./pip_check.sh --help
Use --help first on each script to verify expected behavior in your environment.
Design
- Keep tools small, composable, and script-friendly.
- Prefer one script per domain (package management, Docker, Wi-Fi networking, linting).
- Use subcommands where workflows naturally belong together.
Requirements
- macOS
sh(POSIX shell)- Homebrew (for
brew_check.sh) - Docker CLI + daemon running (for
docker_tools.sh) shellcheck(forsyntaxchecker.sh)
Scripts
| Script | Main use | Side effects | Depends on |
|---|---|---|---|
brew_check.sh | Check/install Homebrew updates | May install/update packages; may clean cache | Homebrew |
docker_tools.sh | List/connect/stop running containers | stop can stop all running containers | Docker daemon + CLI |
wifi_tools.sh | Inspect and manage Wi-Fi connection | reset toggles Wi-Fi interface, uses sudo | macOS networksetup/system_profiler |
pip_check.sh | Check/update packages in activated venv | -i updates pip and outdated packages | Python venv (activated) |
syntaxchecker.sh | Lint shell scripts | None | shellcheck |
brew_check.sh
Check and manage Homebrew updates.
- Checks outdated formulae and casks.
- Can install updates.
- Can clean the Homebrew cache.
Options:
[none]: Check for available updates-i, --install: Install available updates-clean: Clean Homebrew cache-h, --help: Show help message
Examples:
./brew_check.sh # Check for updates
./brew_check.sh -i # Install updates
./brew_check.sh -clean # Clean cache
./brew_check.sh -h # Show help
docker_tools.sh
Docker workflow helper for everyday container operations.
Subcommands:
list: list running containersconnect <id>: open interactive shell in a running container (bashthenshfallback)stop [-y]: stop all running containers (-yskips confirmation)
Examples:
./docker_tools.sh list
./docker_tools.sh connect <container_id>
./docker_tools.sh stop
./docker_tools.sh stop -y
wifi_tools.sh
Wi-Fi inspection and management tool.
Subcommands:
- no args: show help
signal: show Wi-Fi signal metrics (channel, dBm, noise, SNR, Tx rate)signal <n>: repeat signal checkntimes (3s interval)list: list previously-connected Wi-Fi networks (preferred networks onen0)reset: restart Wi-Fi adapter
Examples:
./wifi_tools.sh # Show help
./wifi_tools.sh signal # Show signal metrics
./wifi_tools.sh signal 10 # Repeat 10 times
./wifi_tools.sh list # List known networks
./wifi_tools.sh reset # Reset Wi-Fi adapter
Note: on recent macOS versions, scanning nearby SSIDs via system tools may be redacted. The list command intentionally shows preferred (previously connected) networks for reliable output.
Operational Notes
- Scripts are intended for interactive terminal usage, not unattended automation.
docker_tools.sh stopprompts by default; use-yonly when you want non-interactive behavior.wifi_tools.sh resetrequiressudoand will temporarily interrupt network connectivity.pip_check.shrequires an activated Python virtual environment (source venv/bin/activate).syntaxchecker.shscans recursively from the provided path.
pip_check.sh
Manage pip packages in an activated virtual environment.
- Checks for outdated packages in the venv.
- Can update
pipand installed Python packages. - Can list all installed package metadata.
Options:
[none]: Check for available updates-i, --install: Install available updates-l, --list: List all installed packages-h, --help: Show help message
Examples:
source myproject/venv/bin/activate
./pip_check.sh # Check for updates
./pip_check.sh -i # Install updates
./pip_check.sh -l # List installed packages
./pip_check.sh -h # Show help
syntaxchecker.sh
Run shellcheck on .sh files.
Arguments:
[none]: Lint all.shfiles in the current directoryPATH: Lint all.shfiles under the given path-h, --help: Show help message
Examples:
./syntaxchecker.sh # Lint current directory
./syntaxchecker.sh /some/path # Lint a specific path
./syntaxchecker.sh -h # Show help
Legacy Notes
The following scripts were merged into newer tools:
connect_to_container.sh+stop_all_containers.sh->docker_tools.shnetwork.sh+wifi_strength.sh->network_tools.sh->wifi_tools.sh
Author
Designed by Mikko Drocan.
License
MIT. See LICENSE.