Modular MOTD for macOS + zsh, with user config in ~/.douz.io/motd_config.zsh.
motd.sh: runtime module loader.modules/*.sh: output modules.modules/README.md: module catalog, dependencies, and authoring notes.install.sh: idempotent installer (shell hook + user config).uninstall.sh: clean uninstaller (--purge-configsupported).bin/mac-motd: command wrapper (run,install,uninstall,doctor).packaging/homebrew/*.rb: Homebrew formula templates for your tap (mac-motdandismc).
Use your tap (documented at motd.douz.io):
brew tap douz/tap
brew install mac-motd
mac-motd installFor upgrades after a new release:
brew update
brew upgrade mac-motd
mac-motd installbrew upgrade updates the packaged files, and mac-motd install refreshes the user runtime in ~/.local/share/douz-motd without overwriting your existing ~/.douz.io/motd_config.zsh.
Install module dependencies first (manual install does not install Homebrew dependencies automatically):
brew tap douz/tap
brew install figlet ical-buddy ismc jq smartmontoolsgit clone git@github.com:douz/mac-motd.git
cd mac-motd
./install.shFor upgrades after pulling a new release or updated branch:
git pull --ff-only
./install.shThis refreshes the installed runtime in ~/.local/share/douz-motd and preserves your existing ~/.douz.io/motd_config.zsh unless you explicitly choose ./install.sh --refresh-config.
The installer creates:
~/.douz.io/motd_config.zshDefault content is sourced from config/motd_config.zsh.
Running mac-motd install again preserves your existing config. If you intentionally want to replace it with the latest template, run:
mac-motd install --refresh-configThat command first creates a timestamped backup next to your config, for example ~/.douz.io/motd_config.zsh.bak.20260302091500.
Example:
modulesArray=(
banner
temperature
hdd_usage
battery
calendar_events
)
bannerText="Douz"mac-motd run
mac-motd install
mac-motd install --refresh-config
mac-motd uninstall
mac-motd uninstall --purge-config
mac-motd doctormac-motd uninstallThis removes the shell hook and installed runtime files, but keeps your config.
mac-motd uninstall --purge-configbrew uninstall mac-motdThen optionally remove shell hook/config if still present:
mac-motd uninstall --purge-configThe following tools are used by modules and should be installed when needed:
figletical-buddyismc(provides theiSMCcommand)jqsmartmontools
Install with:
brew tap douz/tap
brew install figlet ical-buddy ismc jq smartmontoolsThe runtime skips modules whose dependencies are missing and prints a warning.
Run the local test suite:
./tests/run.shWhat is covered:
- install idempotency (
install.shcan run repeatedly without duplicate hooks) - uninstall behavior (preserve vs purge config)
- runtime behavior for missing modules/dependencies
- Update
CHANGELOG.mdunder[Unreleased]. - Create and push a version tag:
git tag v0.1.9
git push origin v0.1.9- GitHub Actions will:
- create a GitHub Release with generated notes (
.github/workflows/release.yml) - update the Homebrew tap formula (
.github/workflows/publish-homebrew-tap.yml)
- create a GitHub Release with generated notes (
- Maintainer details:
MAINTAINERS.md - Community support expectations:
SUPPORT.md - Vulnerability reporting:
SECURITY.md - License:
LICENSE(MIT)
Add new modules in modules/<name>.sh, then include them in modulesArray inside ~/.douz.io/motd_config.zsh.
If a module requires commands, add its dependencies in motd.sh under moduleRequirements.
Keep modules/README.md in sync whenever you add, remove, or change a module so contributors can see the current runtime behavior and dependencies in one place.
This repository includes:
LICENSE(MIT)CONTRIBUTING.mdCODE_OF_CONDUCT.mdSECURITY.md- GitHub issue templates and PR template under
.github/
These files define contribution workflow, behavior standards, and private security reporting.
