Building a macOS Dev Workstation Toolkit in Bash: 187 Tests, Pinned CI, and Verified Backups
Every workstation setup starts the same way: a setup.sh that works. Then it accretes. Someone adds a second script. The logging block gets copy-pasted. Config lives in three places and nobody can say which one wins. The README describes a flag that was renamed four months ago. Validation is whatever you remember to run before you break something. The rot isn't dramatic. It's a repo nobody dares…
This repository provides a framework for building, managing, validating, and evolving a professional macOS development workstation using modern Bash engineering practices. The work is called Developer Workstation Framework and it consists of ten utilities: install, update, uninstall, sync, backup, restore, check-project, doctor, repo-clean, and shell-quality. These utilities are built on seven shared Bash libraries.
The repository follows a software project approach to workstation automation, using shared libraries, documented configuration precedence order, behavioral tests, and Continuous Integration (CI) on every change. This approach aims to prevent rot in the workstation setup scripts, which often deteriorate due to lack of tests and scattered configurations.
The framework includes features such as pinned tools, which ensure consistent tool versions across different environments (macOS and Ubuntu). It also incorporates a comprehensive suite of 187 passing Bats tests covering various aspects of the workstation setup, including backup, restore, installation, update, uninstallation, doctoring, cleanup, configuration, shell quality, and repository synchronization.
Furthermore, the backup and restore processes have been enhanced with integrity checks. Backups are recorded and verified, with every backup run creating a manifest containing the filename, source path, and SHA-256 of the content. The restore process verifies the backup against its manifest before overwriting anything, preventing data loss. Safety copies are implemented to ensure that backups do not overwrite each other, and the pre-restore safety copy allows for reversible restorations.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.