lu-zhengda/updater
Sobre
macOS app update manager — check and update apps from Sparkle, Homebrew, Mac App Store, and GitHub Releases
Ferramentas de desenvolvimentoCrescimento medido de estrelas
- em 24 h
- +15
- em 7 dias
- +68
- em 15 dias
- Coletando histórico
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
Originalupdater
updater is a macOS app + CLI/TUI that discovers installed apps, checks for updates across multiple ecosystems, and applies the right update action per app.
Installing gives you both entry points from one binary:
- Updater.app (default) — a menu bar app in
/Applicationsthat checks periodically, shows an update count, notifies about new updates, and updates apps from the menu bar panel. Open it from Applications after install/upgrade. updaterCLI/TUI — the same engine on your PATH for terminal use, scripting, and agents.
Requirements
- macOS 26 Tahoe or later
- Homebrew (recommended)
masfor Mac App Store checks (installed automatically with the Homebrew cask)
macOS 27 verification
Verified locally on macOS 27.0 (build 26A428), Apple silicon, with the macOS
27.0 SDK: race tests, go vet, app bundle build/signature verification, and CLI
discovery. Sparkle feeds respect macOS version limits even when no release
supports the current OS. The menu bar panel, installing updates, notifications,
and login startup still require separate end-to-end verification on macOS 27.
Install (Recommended)
Install from Homebrew tap:
brew install --cask lu-zhengda/tap/updater
updater --version
This installs Updater.app to /Applications, puts the
updater CLI on your PATH, and includes mas automatically as a cask
dependency. Upgrades refresh both, since they are the same binary. Open
Updater.app from Applications after installing.
Upgrade later:
brew upgrade --cask lu-zhengda/tap/updater
Quick Start
# 1) Validate environment and dependencies
updater doctor
# 2) Discover installed apps and detected sources
updater scan
# 3) Check available updates
updater check
# 4) Preview update actions without changing anything
updater update --all --dry-run
# 5) Apply updates
updater update --all
Launch the interactive TUI:
updater
What It Supports
| Source | How updates are checked | Update behavior |
|---|---|---|
| Sparkle | HTTPS appcast from Info.plist or embedded Electron package metadata (including Codex) | Installs notarized updates matching the installed app's bundle and Developer Team identity |
| Homebrew cask (apps and casks that declare a CLI binary) | brew outdated --cask --greedy --json |
brew upgrade --cask <token> |
| Homebrew formula | brew outdated --formula --json |
brew upgrade --formula <formula> |
| Mac App Store | mas outdated |
Manual updates request macOS administrator approval and verify the installed version |
| GitHub Releases | GitHub Releases API | Verifies release digest and Apple identity before direct install |
| Electron generic | HTTPS macOS update feed (including Notion’s ARM channel) | Verifies SHA-512 and Apple identity before direct install |
| Native Electron services | VS Code-compatible update APIs and Squirrel.Mac release indexes (including Claude desktop) | Downloads the native artifact, verifies any supplied checksum and Apple identity, and installs directly |
| Brew-info fallback | brew info --cask --json=v2 |
If brew-installed: brew upgrade --cask; otherwise verifies and installs the cask artifact directly |
| npm globals | npm outdated -g --json |
npm install -g <pkg>@latest |
| pnpm globals | pnpm outdated -g --format json |
pnpm update -g --latest <pkg> |
| pipx applications | pipx list --json + PyPI JSON |
pipx upgrade <environment> |
| uv tools | uv tool list + PyPI JSON |
uv tool upgrade <tool> |
| cargo crates | cargo install --list + crates.io API |
cargo install <crate> |
| macOS system | softwareupdate -l |
Opens Software Update settings |
Updater stays with a detected install channel by default. App Store apps use
the App Store, Homebrew-owned bundles use Homebrew, and standalone apps with a
packaged update feed keep using that feed. If the channel fails, Updater
reports the check failure. Apps whose channel is unknown can still use
configured mappings or available installer metadata. A desktop app's
source_overrides entry explicitly selects a different update source.
The first Homebrew version lookup in each check runs brew update --quiet to pick up newly published casks and formulae, including third-party taps. Concurrent lookups share that refresh. Cask matching for standalone apps uses the refreshed metadata. If another Homebrew update holds the lock, Updater retries for up to two minutes. If a tap fails to refresh, Updater still shows upgrades Homebrew can identify. Other Homebrew lookups report the refresh error because their metadata may be stale. Set HOMEBREW_NO_AUTO_UPDATE=1 in Updater’s environment to use local metadata.
Direct downloads prefer the Mac’s native architecture, then universal builds. Explicitly incompatible builds are excluded. Before replacing an app from a DMG or ZIP, the updater also checks that its executable supports the native architecture, even when filenames omit it.
When you manually update an app using a verified macOS installer package
(.pkg), macOS can ask for administrator approval. Scheduled updates and
--auto never show this prompt: package installation only runs if sudo
already allows it without prompting. Updater does not store your password or
grant itself permanent administrator access. Apps with a built-in automatic
updater, such as standalone Tailscale, can manage their own updates separately.
For direct DMG and ZIP updates, macOS can remember approval in System Settings → Privacy & Security → App Management for Updater or the terminal app that runs it. If macOS blocks a replacement, the installed bundle stays intact. Homebrew-managed casks still use Homebrew's authentication; if it needs a password, run the indicated Homebrew command in Terminal.
Electron discovery reads structured metadata from Resources/app and app.asar,
including archives with unpacked metadata files and apps with renamed frameworks.
Embedded sparkleFeedUrl fields (including app-prefixed names such as
codexSparkleFeedUrl) retain the packaged release channel; conflicting feed URLs
are not guessed. VS Code-compatible product.json update services retain their
stable or insider channel. Claude's release-index address is supplied by a
bundle-ID adapter. Standalone installs with these feeds use the vendor's
installer. Explicit source_overrides still take precedence.
Failed direct installs open the app or download page for manual updating and show the original failure alongside the handoff. The handoff is not recorded as a completed installation. Cancelled installs and failed replacements that could not be rolled back do not launch an external updater. Sources that only support an external updater still offer that manual action. Apps with authenticated or undocumented update protocols require a compatible adapter; Updater does not infer endpoints from arbitrary executable code.
On Apple Silicon, Intel-only apps are offered an Install ARM version action when an update source advertises a native or universal build at the same or a newer version. These suggestions are excluded from unattended auto-updates; pins and ignore settings still apply. Unlabeled downloads do not trigger a suggestion.
Also detected (for visibility): Setapp, JetBrains Toolbox, and Adobe apps.
Command Guide
Core update workflow:
updater scan
updater check
updater check --share
updater update "1Password"
updater update --bundle-id com.1password.1password
updater update --all
updater update --all --auto
updater update --all --dry-run
For an unattended update of one app, use updater update "Microsoft Teams" --auto
or updater update --bundle-id com.microsoft.teams2 --auto. The selector still
limits the operation to that app. --auto skips pinned apps, major updates, ARM
migrations, manual/notify-only policies, and sources requiring an external
updater; a selected app reports why it was skipped. Add --dry-run to preview
the action. Without a selector, --auto considers all eligible apps.
Scripting/JSON:
updater scan --json
updater check --json
updater outdated --json
updater history --json
updater doctor --json
updater update --all --dry-run --json
Agent mode:
- All commands support
--json. - When
updaterdetects it is running inside Codex or Claude Code, JSON output is enabled automatically. - Override behavior with
UPDATER_AGENT_MODE=0(force off) orUPDATER_AGENT_MODE=1(force on). updater update --jsonis supported for dry-run planning (--dry-run).
Management:
updater pin "Google Chrome"
updater unpin "Google Chrome"
updater policy "Google Chrome" manual
updater install firefox
updater rollback "Firefox"
updater cleanup --days 90
updater cleanup --days 90 --delete
pin, unpin, and policy accept package names and IDs from updater scan.
If two sources have the same name, use the full ID, for example
updater pin homebrew.formula.httpie. You can still unpin or clear a policy
by its exact saved ID after uninstalling the package.
Automation:
updater schedule --interval 24
updater schedule --interval 24 --auto-update # explicit opt-in
updater schedule --remove
Menu Bar App (Updater.app)
Updater.app is the default entry point: opening it (Finder, Spotlight, or
a manual launch after installation) runs the menu bar app. It periodically
runs the same discovery/check pipeline as the CLI, shows an update count in
the menu bar when updates are waiting, and posts a macOS notification when new
updates appear. Clicking the status item opens one panel. Update one app or
everything from that panel. Updates go through the regular update path, so
backups and history behave the same as the CLI.
Right-click a row to pin or ignore it. Settings has the same controls: a
switch ignores an app, and the pin glyph marks a pinned app. Pinned apps stay
out of the update list. Ignored apps are skipped by checks. Open at Login and
Update Automatically live in Settings. Update Automatically is off by default.
The check frequency is Hourly, Every 6 Hours, or Daily, and Daily is the
default. The same LaunchAgent can be managed from the CLI. Enabling it
registers ~/Library/LaunchAgents/com.updater.menubar.plist for the next login
and does not start a second copy of an already-running menu bar app:
updater menubar # register the login item (starts at next login)
updater menubar --remove # stop and remove the login item
updater menubar run # run the menu bar app in the foreground (debugging)
The check interval follows schedule_interval from the config (same setting
used by updater schedule).
Updater appears in the same update list as other apps. Use its Update action,
Update All, or YOLO Mode to install a new version. Internally, a helper waits
for active update batches to finish, updates the complete app, and restarts it.
updater upgrade also supports app-bundle installations, including the Homebrew
CLI link. Homebrew cask installations are upgraded through Homebrew;
direct installations verify the release checksum,
signature, notarization, and app identity before replacement. A failed replacement
restores the previous app. Results appear in update history and notifications;
helper details are logged to ~/.config/updater/logs/self-update.log.
Turn on Settings › General › Update Automatically to install available
updates after menu bar checks, including major versions. The control is
yolo_mode in the config. It is off by default and also applies to scheduled
checks. Pins, ignored apps, manual/notify-only policies, download verification,
and the exclusion of ARM migration suggestions still apply. Apps requiring an
external updater remain available for manual action. Successful installs appear
in history; a failed install stays in the update list to retry.
Building the app bundle from source:
make app # produces ./Updater.app
make install-app # copies it to /Applications and launches it
Local app bundles are ad-hoc signed as a complete bundle. To preserve macOS privacy and filesystem grants across rebuilt versions, sign with an Apple-issued identity:
MACOS_SIGNING_IDENTITY="Apple Development: Your Name (TEAMID)" make app
Configuration
Config file path:
~/.config/updater/config.yaml
Example:
ignored_apps:
- com.apple.Safari
pinned_apps:
- com.google.Chrome
# auto | manual | notify-only
policies:
com.microsoft.VSCode: auto
com.google.Chrome: manual
github_mappings:
com.example.MyApp: "example/my-app"
cask_mappings:
com.readdle.PDFExpert-Mac: "pdf-expert"
max_concurrent: 10
max_backups: 0
yolo_mode: false
interactive_notifications: true
Notes:
- Set
GITHUB_TOKENin the environment when authenticated GitHub API access is needed. A legacygithub_tokenconfig value is still accepted, but the config is stored with owner-only permissions. cask_mappingsare only needed when automatic cask token detection is wrong.- Backups are disabled by default because app bundles can be large. Set
max_backupsto a positive per-app retention count. Set it to0to disable backups. The menu bar app does not show a backup control. - Use
updater config exportandupdater config import <file>to move config between machines.
GitHub release versions that differ from the app
If a release tag differs from the version inside the macOS app, add a
source_overrides entry to ~/.config/updater/config.yaml. For example:
source_overrides:
com.nuvio.media.desktop:
kind: github
repo: NuvioMedia/NuvioDesktop
version_source: bundle
version_source: bundle downloads the compatible macOS ZIP or DMG and reads
CFBundleShortVersionString from the app with the matching bundle ID. The app
is not launched or installed. ZIP metadata is read directly; DMGs are mounted
read-only and detached afterward. Missing or ambiguous apps, missing versions,
and download or inspection failures are reported as check errors. Package
installers (.pkg) are not supported for version extraction.
Each check downloads the asset, even when the app is current; installation
downloads it again and performs the usual security checks. Use this option for
apps whose bundle version is the reliable source. This overrides any legacy
github_mappings entry for the same bundle ID. Find an app's bundle ID with
updater scan, then verify the result with updater check.
Version extraction does not bypass installation checks. Nuvio's official
0.1.32-alpha app is ad-hoc signed without an Apple Developer Team ID: bundle
mode detects its update, but Updater's automatic installer rejects replacement
because the installed app cannot establish a trusted developer identity.
That installation still requires a manual update.
For faster checks, a known relationship between tag and app versions can be expressed with a pattern and replacement instead:
source_overrides:
com.nuvio.media.desktop:
kind: github
repo: NuvioMedia/NuvioDesktop
version_source: tag
version_pattern: '^0\.(\d+\.\d+)-alpha$'
version_replacement: '1.${1}'
This example converts 0.1.33-alpha to 1.1.33. Patterns use Go regular
expressions and must match the entire tag after the usual prefix cleanup
(such as removing v). ${1} inserts the first captured group; named captures
are also supported. Keep single quotes around these YAML values so backslashes
are preserved. Both fields are required together, and the result must be a
valid semantic version. A tag that no longer matches produces an error so the
rule can be revised. These fields apply only to version_source: tag.
The source defaults to tag, with no transformation. Both strategies are
opt-in per app; the repository contains no Nuvio-specific detection rule.
Neither strategy can distinguish releases with identical bundle versions.
Safety Model
--dry-runprints the exact planned actions without making changes.- When backups are enabled, they are created before install-based updates when app paths are available.
- Failed direct installs attempt automatic rollback when a backup is available.
- Downloaded apps must be valid, notarized, and match the installed bundle ID and Developer Team ID. Installer packages must be notarized and signed by that same team.
- Scheduled checks notify only by default; unattended installation requires
schedule --auto-update(non-major updates) or YOLO Mode (including major updates). - Pinned apps are skipped in
update --all. policylets you force per-app behavior (auto,manual,notify-only).
Build From Source
Requires Go 1.27.3+.
git clone https://github.com/lu-zhengda/updater.git
cd updater
make install PREFIX=~/.local
If needed, add to PATH:
export PATH="$HOME/.local/bin:$PATH"
If building from source and you want Mac App Store checks, install mas:
brew install mas
Releasing
Tagged releases are signed and notarized on GitHub Actions. See docs/RELEASING.md.
Developer Commands
make build
make test
make clean
To reproduce issue #18 with an actual Nuvio 0.1.32-alpha app:
UPDATER_TEST_NUVIO_APP=/path/to/Nuvio.app \
go test -v ./cmd/updater -run '^TestLiveNuvioDirectInstall$' -count=1
The opt-in test updates only a temporary copy and does not launch the app. It requires a successful installation and a clean rescan to pass; the official ad-hoc-signed build currently fails at the developer identity check described above, after confirming the version-detection fix.
License
MIT
Explore projetos relacionados
Carregando…