@seangalie/companion
v1.1.0
Published
A terminal-based macOS update console that runs softwareupdate, mas, mise, npm, Deno, Bun, pnpm, Yarn, pipx, uv, rustup, cargo, Composer, gh, VS Code, Cursor, tldr, Homebrew, and Docker image update tasks in sequence.
Maintainers
Readme
macOS Companion
A terminal-based macOS update console.
companion.sh runs a sequence of common update tasks for macOS so they can be
kicked off with a single command.
What it does
The script runs the following tasks in order:
sudo softwareupdate -i -a— install all available macOS software updatesmas upgrade— upgrade Mac App Store apps via themasCLImise upgrade— upgrade tools managed by misenpm update -g— update globally installed npm packagesdeno upgrade— upgrade the Deno runtimebun update -g— update globally installed Bun packagespnpm update -g— update globally installed pnpm packagesyarn global upgrade— upgrade globally installed Yarn packagespipx upgrade-all— upgrade all pipx-managed Python applicationsuv tool upgrade --all— upgrade tools installed via uvrustup update— update installed Rust toolchainscargo install-update -a— update all cargo-installed binaries (requires thecargo-updatecrate)composer global update— update globally installed Composer packagesgh extension upgrade --all— upgrade installed GitHub CLI extensionscode --update-extensions— update installed VS Code extensionscursor --update-extensions— update installed Cursor extensionstldr --update— refresh the cached tldr pagesbrew update— refresh the local Homebrew formula and cask indexbrew upgrade— upgrade outdated Homebrew packagesbrew cleanup— remove outdated Homebrew downloads and stale versionsdocker pullfor each local image — pull the latest version of every image known to the Docker daemon (skipped when Docker is not installed or the daemon is not running)
Steps that depend on a missing tool are skipped with a warning. Each step prints a clearly labeled header so progress is easy to follow.
Requirements
- macOS with the built-in
softwareupdatecommand sudoaccess forsoftwareupdate- All other tools are optional — their steps are skipped when the command
is not on
PATH:- Homebrew for the
brewsteps masformas upgrade- mise for
mise upgrade - Node.js / npm for
npm update -g - Deno for
deno upgrade - Bun for
bun update -g - pnpm for
pnpm update -g - Yarn for
yarn global upgrade - pipx for
pipx upgrade-all - uv for
uv tool upgrade --all - rustup for
rustup update cargo-updateforcargo install-update -a- Composer for
composer global update - GitHub CLI for
gh extension upgrade --all - VS Code for
code --update-extensions - Cursor for
cursor --update-extensions - tldr for
tldr --update - Docker for the Docker image pull step; Docker Desktop itself is updated via the Homebrew cask step above
- Homebrew for the
Usage
From the repository directory:
./companion.shThe script will prompt for your password when sudo softwareupdate runs.
Installing to your PATH
To run companion from anywhere, install a copy to your local bin
directory:
./companion.sh --installBy default this copies the script to ~/.local/bin/companion. If that
directory is not already on your PATH, the installer prints the line to
add to your shell profile.
Override the destination with the COMPANION_INSTALL_DIR environment
variable:
COMPANION_INSTALL_DIR=/usr/local/bin ./companion.sh --installTo remove an installed copy, run:
companion --uninstallThe uninstaller prompts for confirmation before deleting the file. It
honours the same COMPANION_INSTALL_DIR override as --install.
Run ./companion.sh --help for a full list of options.
Installing via npm
The repository also ships with a package.json so it can be installed as
a global npm package, which exposes companion on your PATH:
npm install -g @seangalie/companionOr directly from the repository:
npm install -g git+https://code.galie.io/seangalie/companion.gitThe package is marked "os": ["darwin"], so npm will refuse to install it
on non-macOS systems.
Versioning
See CHANGELOG.md for release history. The project follows Semantic Versioning.
