Introduction
Topgrade is a single command that detects which package managers and tools are installed on your system and runs their update commands in sequence. Instead of remembering apt update, brew upgrade, rustup update, and a dozen others, you run topgrade once.
What Topgrade Does
- Detects installed package managers (apt, brew, pacman, dnf, etc.)
- Updates programming language toolchains (rustup, pyenv, nvm, sdkman, etc.)
- Upgrades editor plugins (Vim, Neovim, Emacs, VS Code extensions)
- Refreshes container images, Flatpaks, Snaps, and firmware
- Runs custom pre- and post-upgrade commands defined in configuration
Architecture Overview
Topgrade is a single Rust binary that checks for the presence of known tools by probing the filesystem and PATH. Each detected tool has a corresponding upgrade step. Steps run sequentially with stdout/stderr streamed to the terminal. The configuration file allows disabling steps, adding custom commands, and setting timeouts.
Self-Hosting & Configuration
- Install via Cargo, Homebrew, or system package managers
- Configuration file at ~/.config/topgrade/topgrade.toml
- Disable specific steps with
[misc] disable = ["snap", "flatpak"] - Add custom pre/post commands in the [pre_commands] and [post_commands] sections
- Use --dry-run to preview what would be updated without executing
Key Features
- Supports 50+ package managers and tools out of the box
- Cross-platform: Linux, macOS, Windows, and FreeBSD
- Configurable step order, timeouts, and skip rules
- Dry-run mode for safe previewing
- Self-update capability to keep Topgrade itself current
Comparison with Similar Tools
- apt/brew/pacman — single package manager; Topgrade orchestrates all of them
- Homebrew Bundle — macOS-only Brewfile runner; Topgrade is cross-platform and broader
- nix-env --upgrade — Nix-specific; Topgrade covers heterogeneous environments
- winget upgrade --all — Windows-only; Topgrade spans operating systems
- freshenv — environment setup tool; Topgrade focuses on ongoing maintenance
FAQ
Q: Will Topgrade break my system? A: Topgrade runs the same commands you would manually. Use --dry-run to preview.
Q: Can I skip certain package managers? A: Yes. Disable them in topgrade.toml or pass --disable flags on the command line.
Q: Does it require root? A: Only for system package managers (apt, pacman). User-level tools run without root.
Q: How do I add a custom upgrade step? A: Add entries under [pre_commands] or [post_commands] in topgrade.toml.