ansimotd: Retro ANSI Art for Your Terminal
I built a little shell script called ansimotd that displays random ANSI art whenever you open a terminal.

How it works
The script looks for ANSI art files in ~/.config/ansimotd/ and randomly selects one to display. It parses SAUCE metadata (a 128-byte block at the end of ANSI files) to determine the dimensions of each piece of art.
Getting started
To use it, just add it to your shell profile:
# Add to ~/.zshrc or ~/.bashrc
source /path/to/ansimotd.sh
Then populate ~/.config/ansimotd/ with ANSI art files. The README includes instructions for downloading art collections.
Technical details
The script handles several interesting challenges:
- SAUCE parsing: Extracts width and height from binary metadata using
tail,od, and byte offset calculations - Terminal detection: Falls back gracefully when
tputisn’t available - Random selection: Uses
shuffor efficient random sampling without loading all files into memory - Character encoding: Converts from CP437 (the DOS character set) to display art correctly
It’s a fun little project that adds some personality to your terminal. Check it out at github.com/retlehs/ansimotd.