Topgrade

Detects installed package managers and tools on your system and runs the appropriate update commands for each in a single invocation.

install

Topgrade is a system update tool that detects which package managers and tools are installed on a machine and runs the matching upgrade commands. It replaces the long, non-portable shell one-liners people otherwise keep to chain updates from several package managers. Usage is just running topgrade. This repository is a maintained fork of r-darwish's original topgrade.

Behavior is controlled by a TOML configuration file. Topgrade looks for CONFIG_DIR/topgrade.toml first, then CONFIG_DIR/topgrade/topgrade.toml. CONFIG_DIR is %APPDATA% on Windows and ${XDG_CONFIG_HOME:-~/.config} on macOS and other Unix systems. On first run it creates a default file if none exists, and it merges any files in CONFIG_DIR/topgrade.d/ before the main file. An example is provided in config.example.toml.

The configuration can define custom commands that run before, during, or after the built-in steps. They run in a new shell taken from $SHELL on Unix (falling back to sh) or pwsh on Windows (falling back to powershell). On Unix, a leading -i runs the command in an interactive shell so RC files are sourced.

Topgrade also supports remote execution. A remote_topgrades key in the configuration lists hostnames that have Topgrade installed. Topgrade uses ssh to run topgrade on those hosts before updating the local machine, and --remote-host-limit restricts the run to specific hosts. It is aimed at developers and sysadmins who maintain one or more machines on Windows, macOS, or Linux. The released binary can update itself.

Installation

# via Homebrew
brew install topgrade
# via Cargo
cargo install topgrade
# via Winget
winget install --id=topgrade-rs.topgrade  -e

Topgrade demo

Alternatives & related tools

add a badge to your README

Maintain Topgrade? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/topgrade.svg)](https://www.trmn.sh/tools/topgrade?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/topgrade?utm_source=badge"><img src="https://www.trmn.sh/badge/topgrade.svg" alt="Featured on trmn" height="20"></a>