Gruf gets superpowers
In my last article article I introduced Gruf, a command line tool for interacting with Gerrit. Since then, Gruf has gained a few important new features.
Caching⌗
Gruf will now by default cache results for five minutes. This avoids
repeatedly querying the server for the same information when you’re
just displaying it with different templates (for example, if you run a
gruf query open here
followed by a gruf -t patches query open here
).
The cache lifetime can be tuned on the command line (with the
--cache-lifetime
option) or in the gruf.yml
configuration file (as
the cache_lifetime
parameter). Gruf has also learned the
invalidate-cache
command if you want to clear out the cache.
Better streaming⌗
I have substantially enhanced the support for the Gerrit stream-events command.
Automatic reconnection⌗
Gruf will now automatically reconnect to the Gerrit server if the connection is lost while streaming events.
Better default templates⌗
The default stream-events
template now produces colorized output,
and there is also a short
template that produces one or two line
output for each event that can be useful if you just want to see
what’s going on.
The default output looks like this:
The short output looks something like this: