Toolbox - packages and config files
Welcome to Toolbox Weekly, a small recurring column where I write down the
tools, extensions and workflow tricks I discovered during the week .. and who knows
what else; Instead of the famous 5 best tools of the year reports and general hype,
here are the ones that survived past the “ooh shiny” phase and actually earned a place in my
$PATH. Short, opinionated, no fluff.
In this post I pick two tools from the system management group.
I was always bothered with all the packages and repos that I need to manage and keep up to date. I am used to try many tools and craft my system with tools I find. Changes after changes and I never remember what I have. Two ways to manage packages and config files.
topgrade
Solve the problem, which I am sure everyone has in his Linux box, which all the software and packages which are dropped in his toolchain but are not part of the distribution packager.
$ topgrade
That’s it. It detects the managers for you (system packages, the universal formats, the per-language ones) and even self-updating CLIs, like claude and a list of git repos you hand it. One command, one coffee, everything current. Come on man, shouldn’t that be the default in any system?
I recommend run it first with
--dry-runand see exactly what it would do before it touches anything. Then configure it because there are many thing likely not want to update automaticallygit repos are invisible. topgrade only auto-pulls a predefined set of repos. they need manual added to the configuration.
Version ranges can quietly pin you. Fast-moving
0.xCLIs installed via a package manager may never cross a minor bump on a plain “update”, so they look handled but drift behind. The fix is a one-line custom step that forces the latest. Same trick works for a lone binary that ships its ownupdatesubcommand β just tell topgrade to call it.In
~/.config/topgrade.toml, a[commands]block is all it takes:[commands] "update claude" = "claude update"Each line becomes its own step in the run, so the self-updating binaries ride along with everything else.
chezmoi
chezmoi is a dotfiles manager that treats your ~/.config as a source repo
you can version, template and replay onto any machine. Adding a file is one
command:
$ chezmoi add ~/.config/<the-config>
β¦and it’s now tracked, diff-able, and one chezmoi apply away from existing on
a fresh laptop. I would say that give you more control over your config files among
all the tools you are handling, letting you commit what change and why.
- Can become overwhelming remember to commit your changes every time
- Have a beautiful feature to handle sensitive data in the config files. Definitely take a look
The takeaway
The pairing is almost poetic: topgrade keeps my tools current, chezmoi keeps topgrade current. The thing that remembers, and the thing that does β both in git.
$ topgrade # update the whole world
$ chezmoi apply # make a new machine look like this one
Next week: something smaller and weirder. See you then. π οΈ