ra-yavuz › herald

herald
A small Linux daemon and CLI that prints a daily quote at the top of every new terminal and at login. Cached, configurable refresh, local fallback pool.
Quick install (Debian / Ubuntu)
One line. Sets up the signed ra-yavuz apt repo if not already
added, refreshes the package index, and installs herald. Idempotent, safe
to re-run:
sudo bash -c 'set -e; install -m 0755 -d /etc/apt/keyrings && curl -fsSL https://ra-yavuz.github.io/apt/pubkey.gpg -o /etc/apt/keyrings/ra-yavuz.gpg && echo "deb [signed-by=/etc/apt/keyrings/ra-yavuz.gpg] https://ra-yavuz.github.io/apt stable main" > /etc/apt/sources.list.d/ra-yavuz.list && apt update && apt install -y herald'
Or via the bundled installer script (equivalent, with prerequisite checks and a friendlier output summary):
curl -fsSL https://raw.githubusercontent.com/ra-yavuz/herald/main/scripts/get.sh | sudo bash
If you already have the ra-yavuz apt repo, all you need is
sudo apt update && sudo apt install herald. The
sudo apt update step is required: without it apt will not see
new packages or new versions.
Future upgrades: sudo apt update && sudo apt upgrade.
Full removal: sudo apt purge herald.
Step by step (manual repo setup)
# 1. Trust the signing key
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://ra-yavuz.github.io/apt/pubkey.gpg \
| sudo tee /etc/apt/keyrings/ra-yavuz.gpg > /dev/null
# 2. Add the apt source
echo "deb [signed-by=/etc/apt/keyrings/ra-yavuz.gpg] https://ra-yavuz.github.io/apt stable main" \
| sudo tee /etc/apt/sources.list.d/ra-yavuz.list
# 3. Refresh the package index, then install
sudo apt update
sudo apt install herald
Platform support
Tested on Ubuntu (Linux only). Should also work on
WSL2 Ubuntu / Debian distros, since those are Linux.
macOS is not supported: herald hooks into
/etc/profile.d/, update-motd.d/, and a systemd
timer, none of which apply on Darwin.
What it does
Two display surfaces, both off by default:
-
Terminal greeting: every new interactive shell prints
today's quote. Hooked into
/etc/profile.d/and a marker block in the invoking user's~/.bashrc(since/etc/bash.bashrcon Ubuntu does not source profile.d). -
Login MOTD: SSH, console, or display-manager login
shows the quote in the banner. Hooked into
/etc/update-motd.d/(requires theupdate-motdpackage on Debian/Ubuntu).
Toggle independently:
sudo herald terminal on # eye candy: every new terminal
sudo herald motd on # login banner: SSH / console / DM
sudo herald all on # both
sudo herald all off # neither
herald status # what's enabled
Quote source and refresh cadence
Online: zenquotes.io, 1.5s timeout
per refresh. Fallback: a bundled local pool of ~30 curated quotes
(/usr/share/herald/quotes.json). The tool works offline.
Refresh cadence is configurable in hours, default every 3 hours:
sudo herald set-refresh 24 # once a day
sudo herald set-refresh 168 # once a week
sudo herald set-refresh 1 # hourly
sudo herald set-refresh 0 # disable timer (manual only)
sudo herald refresh # fetch right now
Implementation: a systemd timer
(herald-refresh.timer) writes a cached JSON object at
/var/cache/herald/today.json. Both display surfaces
read from the cache, so login/shell startup is fast.
Optional prefix
sudo herald set-prefix "Welcome to tripolis. Coffee, then code."
sudo herald clear-prefix
Stored at /etc/herald.prefix. Printed verbatim above
the quote.
Sample output
$ herald
"Premature optimization is the root of all evil."
-- Donald Knuth
Plays nicely with other ra-yavuz tools
herald is fully independent. It does not know about, depend on, or
modify any other tool. If you have inhibit-charge
installed with its terminal greeting enabled, both lines appear in
every new terminal: battery state above, herald quote below. They
share /etc/profile.d/ but each snippet is independent.
Disclaimer / no warranty
sudo herald set-refresh 0 if you prefer to use only
the bundled local pool. Full text:
repo README,
license: MIT.