feat(check): add dev environment checks to optimize and check#666
feat(check): add dev environment checks to optimize and check#666sebastianbreguel wants to merge 1 commit intotw93:mainfrom
Conversation
Add a new "Dev Environment" section to mo optimize and mo check that surfaces developer-relevant system health: broken launch agents, missing dev tools, and version mismatches between tool pairs.
|
Hey @sebastianbreguel, great feature and solid test coverage! Applied this to main directly (commit c7e71fd) with two small security fixes before merging:
Everything else landed as-is, including the header deduplication in mo update --nightly |
Summary
Adds a new Dev Environment section to
mo optimizeandmo checkthat surfaces developer-relevant system health information. These checks are purely informational — they show, don't fix.Discussed in #659 as features that fit naturally inside existing commands.
New checks
Launch Agents
Scans
~/Library/LaunchAgents/*.plistfor broken entries — plists whoseProgramArgumentsbinary no longer exists on disk. Common after uninstalling apps.Dev Tools
Verifies presence of common developer tools:
git,node,python3,brew,docker,go,xcode-select. Only reports missing tools.Version Mismatches
Detects conflicts between co-installed tool versions (only checked when both sides are installed):
psql --versionvspostgres --versionnode --versionvsnvm version defaultpython3 --versionvspyenv versionBehavior
mo check, sequentially inmo optimizeVisual preview
All healthy:
With issues:
What changed
lib/check/dev_environment.shbin/check.shbin/optimize.shrun_system_checks()tests/dev_environment.batsTest plan
bash -n lib/check/dev_environment.sh— clean syntaxbash -n bin/check.sh && bash -n bin/optimize.sh— clean syntaxbats tests/dev_environment.bats— all 8 tests passmo optimize— Dev Environment section appears after System Configurationbash bin/check.sh— Dev Environment section appears after Configurationcheck_launch_agents,check_dev_tools,check_version_mismatches