{"id":42831686,"url":"https://github.com/ggfevans/homebrew-launchd-updater","last_synced_at":"2026-01-30T11:30:47.364Z","repository":{"id":333104327,"uuid":"1136204714","full_name":"ggfevans/homebrew-launchd-updater","owner":"ggfevans","description":"Automated Homebrew updates via launchd. Runs at 2 AM, checks for AC power, and doesn't ask permission","archived":false,"fork":false,"pushed_at":"2026-01-17T09:55:54.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-17T20:52:24.234Z","etag":null,"topics":["automation","homebrew","launchd","macos","package-manager","scheduled-tasks","shell-script","system-maintenance"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ggfevans.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-17T09:01:01.000Z","updated_at":"2026-01-17T09:55:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ggfevans/homebrew-launchd-updater","commit_stats":null,"previous_names":["ggfevans/homebrew-launchd-updater"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ggfevans/homebrew-launchd-updater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fhomebrew-launchd-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fhomebrew-launchd-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fhomebrew-launchd-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fhomebrew-launchd-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggfevans","download_url":"https://codeload.github.com/ggfevans/homebrew-launchd-updater/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggfevans%2Fhomebrew-launchd-updater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28911821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T08:15:08.179Z","status":"ssl_error","status_checked_at":"2026-01-30T08:14:31.507Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","homebrew","launchd","macos","package-manager","scheduled-tasks","shell-script","system-maintenance"],"created_at":"2026-01-30T11:30:46.634Z","updated_at":"2026-01-30T11:30:47.320Z","avatar_url":"https://github.com/ggfevans.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Homebrew launchd Updater\n\n[![Tests](https://github.com/ggfevans/homebrew-launchd-updater/workflows/Tests/badge.svg)](https://github.com/ggfevans/homebrew-launchd-updater/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n![macOS](https://img.shields.io/badge/macOS-10.12+-blue?logo=apple)\n![Homebrew](https://img.shields.io/badge/homebrew-required-orange?logo=homebrew)\n\nAutomatically run `brew update \u0026\u0026 brew upgrade` daily on macOS using launchd. Checks for AC power and internet connectivity before running.\n\n## Features\n\n- Runs at 2 AM daily (configurable)\n- Only runs when plugged into AC power\n- Skips if offline\n- Retries up to 3 times with 5-minute delays\n- 30-minute timeout to prevent hanging\n- Logs to `~/Library/Logs/brew-upgrade.log`\n- Runs silently in background\n- Sets `HOMEBREW_NO_AUTO_UPDATE=1` to prevent nested updates\n\n## Installation\n\n### Quick Install\n\n```bash\ngit clone https://github.com/ggfevans/homebrew-launchd-updater.git\ncd homebrew-launchd-updater\n./install.sh\n```\n\n### Manual Install\n\n1. Copy the helper script:\n```bash\nmkdir -p ~/Library/Application\\ Support\ncp brew-upgrade-helper.sh ~/Library/Application\\ Support/\nchmod +x ~/Library/Application\\ Support/brew-upgrade-helper.sh\n```\n\n2. Copy the launchd plist:\n```bash\nmkdir -p ~/Library/LaunchAgents\ncp com.local.brew-upgrade.plist ~/Library/LaunchAgents/\n```\n\n3. Load the job:\n```bash\nlaunchctl load ~/Library/LaunchAgents/com.local.brew-upgrade.plist\n```\n\n## Configuration\n\nEdit `com.local.brew-upgrade.plist`:\n- Run time: Modify `StartCalendarInterval` (Hour and Minute keys)\n- Timeout: Adjust `TimeOut` value (in seconds)\n\nEdit `brew-upgrade-helper.sh`:\n- `MAX_RETRIES`: Number of retry attempts (default: 3)\n- `RETRY_DELAY`: Delay between retries in seconds (default: 300)\n- `TIMEOUT`: Per-command timeout in seconds (default: 1800)\n\n## Monitoring\n\nView the logs:\n```bash\ntail -f ~/Library/Logs/brew-upgrade.log\n```\n\nCheck if the job is loaded:\n```bash\nlaunchctl list | grep brew-upgrade\n```\n\nGet next scheduled run:\n```bash\nlaunchctl list com.local.brew-upgrade\n```\n\n## Uninstall\n\n```bash\nlaunchctl unload ~/Library/LaunchAgents/com.local.brew-upgrade.plist\nrm ~/Library/LaunchAgents/com.local.brew-upgrade.plist\nrm ~/Library/Application\\ Support/brew-upgrade-helper.sh\nrm ~/Library/Logs/brew-upgrade.log\n```\n\nOr use the provided uninstall script:\n```bash\n./uninstall.sh\n```\n\n## How It Works\n\n1. launchd triggers the job at 2 AM daily\n2. Helper script checks:\n   - AC power connection\n   - Internet connectivity\n   - Runs `brew update \u0026\u0026 brew upgrade` with retries\n3. Timeout kills the process after 30 minutes\n4. Output logged to `~/Library/Logs/brew-upgrade.log`\n\n## Requirements\n\n- macOS (10.12+)\n- Homebrew installed\n- zsh or bash\n\n## Troubleshooting\n\n**Job not running?**\n- Check logs: `tail ~/Library/Logs/brew-upgrade.log`\n- Verify it's loaded: `launchctl list | grep brew-upgrade`\n- Reload: `launchctl unload ~/Library/LaunchAgents/com.local.brew-upgrade.plist \u0026\u0026 launchctl load ~/Library/LaunchAgents/com.local.brew-upgrade.plist`\n\n**Permission denied errors?**\n- Make sure helper script is executable: `chmod +x ~/Library/Application\\ Support/brew-upgrade-helper.sh`\n\n**Running on battery?**\n- By design. The job only runs when plugged in.\n\n**Manual test run:**\n```bash\n~/Library/Application\\ Support/brew-upgrade-helper.sh\n```\n\n**No shell profile needed:**\nScript doesn't need `.zprofile` or `.zshrc`. Detects brew path with `which`.\n\n## License\n\nMIT\n\n## Testing\n\nRun the test suite to validate all scripts and configuration:\n```bash\n./test.sh\n```\n\nRequires `shellcheck` (install with `brew install shellcheck`).\n\n## Contributing\n\nContributions welcome! Please open issues and PRs.\n\n---\n\n*Built with assistance from AI tooling.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggfevans%2Fhomebrew-launchd-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggfevans%2Fhomebrew-launchd-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggfevans%2Fhomebrew-launchd-updater/lists"}