Skip to content

v0.5.0: Cache moves to the user cache directory, reworked CLI output, and new TUI apply key

Choose a tag to compare

@github-actions github-actions released this 26 Oct 16:30
· 46 commits to main since this release
5dea16e

The Count has moved his cache out of your checkouts and into your user cache directory, and reworked the CLI's human output, help pages and TUI. Several changes break existing scripts and flags, so read Breaking Changes before you upgrade.

Added

  • Progress spinner while lookups run (#50, @sweepies). On a terminal, lookup, run, apply and tui show a spinner with live counts, such as looking up 64 dependencies… 23/64. It appears only on stderr, and not at all when output is piped or NO_COLOR is set.
  • Styled help pages (#49, @sweepies). Help output now has coloured headings, bold command and flag names, and an example block on the root page and on every command. Each page ends with a pointer to --help on the command. Piped output and NO_COLOR produce plain text with no escape codes.
  • Brand colours (#51, @sweepies). The CLI and TUI use the Count's palette. Truecolor is used when COLORTERM is truecolor or 24bit, 256 colours when TERM contains 256color, and 16 colours otherwise.

Changed

  • Grouped report output (#50, @sweepies). Each lookup and run report opens with a one-line summary of counts. Results are grouped by repository, and lookup now lists each update with its type, name, current and target versions, and file. Timings and request counts print only with -v.
  • Reports go to stdout (#50, @sweepies). The lookup and run report is the command's output, so it now goes to stdout, as --json already did. apply still writes its summary to stderr.
  • TUI keys (#48, @sweepies). Apply is now w, confirmed with y. space toggles one update, and a selects or clears every visible update. The key bar shows only the keys that work on the current tab, and says why w or u is unavailable: the lookup ran on a server (pass --here), repositories come from GitHub, nothing is selected, or the tree has uncommitted changes.
  • TUI layout (#51, @sweepies). Table columns size to their content, so versions stay whole and long dependency names are cut in the middle. The Warnings tab is a scrollable pager with j/k and PgUp/PgDn.

Fixed

  • Apply was hard to find in the TUI (#48, @sweepies). At 80 columns the footer cut off the apply hint, and the TUI dropped apply silently when a checkout ran on a server. The footer now wraps, and the message names --here.
  • Messages no longer hide the key bar (#48, @sweepies). A status message such as "Select updates with space first." sits above the key bar until your next key press, instead of replacing it.
  • Duplicated headings in docs search (#46, @sweepies). Search results showed group labels twice, such as "Run itRun it". Each result now shows the label once.

Breaking Changes

  • --cache takes a directory. A path to an existing file is rejected with an error. Replace the file path with a directory:

    # before
    patchula lookup --cache ./patchula.sqlite
    
    # after
    patchula lookup --cache ./patchula-cache
  • The default cache moved out of the checkout. Without --cache, local commands use a patchula/ folder in the user cache directory: $XDG_CACHE_HOME or ~/.cache on Linux, and ~/Library/Caches on macOS. The folder is shared across checkouts. .patchula-cache.sqlite, .patchula-cache.worktrees/ and .patchula-cache.tools/ in a repository are no longer read and can be deleted. If neither HOME nor XDG_CACHE_HOME is set, commands stop and ask for --cache DIR.

  • Server cache is a directory too. serve --cache and PATCHULA_SERVER_CACHE take a directory. The default is patchula/server in the user cache directory, instead of .patchula-server.sqlite in the working directory. The container image stores its data in /var/lib/patchula.

  • Summary output is on stdout. Scripts that read the lookup or run summary from stderr must read stdout instead.

  • TUI apply moved to w. Pressing A no longer applies. Press w, then y to confirm.

  • Timings need -v. The request, cache-hit and phase timing lines are no longer printed by default.

Full Changelog: v0.4.0...v0.5.0