motd-tool
v1.0.3
Published
Tiny CLI that prints a random message of the day in your terminal.
Maintainers
Readme
motd-tool
Tiny CLI that prints a random message of the day in your terminal.
xmotd is built for developers who live in the shell and want something lighter than a dashboard, but more personal than a static prompt.
Why people install it
xmotdprints a random line from your own local message libraryxmotd initshows one message automatically on the first terminal session of each dayxmotd add,remove,list,import, andexportkeep the message library simple- It is local-first, fast, and dependency-light at runtime
Quick look
$ xmotd
Stay hungry, stay foolish.$ xmotd add "Code is poetry"
Added: Code is poetry$ xmotd list
1. Stay hungry, stay foolish.
2. Code is poetry$ xmotd remove 2
Removed #2: Code is poetryInstall
Install from npm:
npm install -g motd-toolInstall from Homebrew:
brew install AlucPro/tap/motd-toolThe Homebrew formula downloads the release tarball from GitHub Releases.
For local development, this repository uses pnpm and TypeScript:
pnpm install
pnpm checkUsage
Print a random message:
xmotdAdd a message:
xmotd add "Ship small, ship often"Remove a message by index or exact text:
xmotd remove 2
xmotd remove "Ship small, ship often"List all messages:
xmotd listImport messages from .txt or .json:
xmotd import ./messages.txt
xmotd import ./messages.jsonExport your current library:
xmotd export ./backup.json
xmotd export ./backup.txtEnable once-per-day automatic output in your shell:
xmotd initPreview the shell hook:
xmotd hookSee where files are stored:
xmotd pathsDefault behavior
After installation, xmotd starts with one built-in message:
Stay hungry, stay foolish.Every manual xmotd run selects a random message from your local library.
The automatic shell hook uses a separate state file so the message only appears once per local calendar day.
Message storage
xmotd stores data in standard XDG-style locations:
- Config:
~/.config/motd-tool/messages.json - State:
~/.local/state/motd-tool/state.json
You can override these with XDG_CONFIG_HOME and XDG_STATE_HOME.
Release workflow
Project maintainers can use:
pnpm release:checkpnpm release:check runs build and tests, then updates the Homebrew formula SHA based on the npm tarball.
Release flow:
- Update
package.jsonversion - Commit the release changes
- Push
main - Create and push a matching tag such as
v1.0.1
git add .
git commit -m "release: v1.0.1"
git push origin main
git tag v1.0.1
git push origin v1.0.1When the tag lands on GitHub, the Release workflow will:
- build and test the project
- publish
motd-toolto npm withNPM_TOKEN - rebuild the Homebrew formula with the new npm tarball SHA
- point the Homebrew formula at the matching GitHub Release asset
- push
Formula/motd-tool.rbtoAlucPro/homebrew-tapwithHOMEBREW_TAP_TOKEN - create a GitHub Release with the packaged tarball
GitHub Actions included in this repo:
CI: install, build, test, and pack on pushes and pull requestsRelease: publish to npm, update the Homebrew tap, and attach the package tarball when av*tag is pushed
Contributing
Issues and pull requests are welcome.
The easiest way to contribute is to improve the default message set, shell support, and installation experience.
License
MIT
