Skip to content

dist-town/cli 0.5.0

Graham
Sep 1, 20262 min read

One new command, and it's the point of the whole thing.

disttown update

The CLI now updates itself — and it does it without touching a single dist.town service. It resolves its publisher's identity, follows the latest pointer in their repo, fetches the release record, downloads the artifact for your platform, and verifies it against the digest in the signed record. If dist.town went dark tomorrow, this command would not notice.

Before replacing anything, it tells you where the update comes from — publisher handle and DID, version, publication time, digest — and asks. --yes consents for automation; --check reports without acting (exit 2 when an update is available, for scripts); --channel beta follows a channel instead of latest.

Some behavior worth knowing:

  • A yanked release is never installed. If latest points at one, the updater reports no update and stays put.
  • If the publisher rolls latest back to an earlier release, the updater says so plainly — a rollback is followed with your consent, never silently.
  • Package-managed installs (nix store, system paths) are left alone, with a pointer to the right tool.

Also

  • publish and the lifecycle verbs no longer write a pointer update when the pointer already targets the release — a no-op record update turned out to be something firehose consumers can choke on.

Did you enjoy this article?

Recommend it — Standard Reader surfaces well-loved writing to more readers across the network.

Across the AtmosphereDiscussions