Possessing fortune-mod: Bringing an abandoned UNIX oracle back from the dead
For Hacktober Week 4's "Ghost in the Machine" challenge, I decided to bring something forgotten back to life. Not a person, but a program.
The Story
In the quiet corners of UNIX history, fortune-mod sat forgotten. A simple oracle that once amused generations of hackers with its dry wit and groan-worthy puns, it had been left behind as computing moved on.
For DÃa de los Muertos and Halloween, we remember not just the people who came before us, but the programs too. Like candles on an ofrenda, these forgotten tools deserve to be brought back to life.
Rather than rebuilding it from scratch, ghost-fortune possesses the old oracle - whispering eerie follow-ups through a local open-weight model, or channeling entirely new cursed fortunes from beyond. All while keeping the original archive alive as a fallback. The spirits of old UNIX live on, now haunted by modern AI running entirely on your machine.
What I Built
I extended my existing Ghost in the Machine repo with ghost-fortune, a possessed fortune teller with:
- Haunted TUI - A proper terminal UI with colors, boxes, and a spooky menu
-
Classic mode - Uses the original
fortunebinary if installed, otherwise falls back to an embedded corpus - Haunt mode - Takes a classic fortune and has a local open-weight model add an eerie whisper
- Possess mode - Generates brand new cursed fortunes from scratch in vintage UNIX style
- Tales & AI Story Teller - Short horror stories about forgotten processes, cron jobs, dotfiles, and sysadmin legends
- Spooky audio/voice - Optional sound effects and ghostly TTS (opt-in via env vars)
-
Graceful fallbacks - Works even with no local model or no
fortuneinstalled
Why Open Innovation Matters
The open-source pieces are what make this project work:
-
Built on open history - Uses
fortune-modarchives and public-domain fortune style when available - Open-weight AI at its core - Runs on any OpenAI-compatible local server (Ollama, OpenWebUI, LMDeploy, etc.)
- Runs offline - With a cached local model, everything works air-gapped. No network required.
- Data stays local - Prompts and fortunes never leave your machine. No telemetry, no API keys.
-
Swap freely - Change models with a single env var (
GHOST_MODEL). Try different open-weight models with ease. - $0 to run - After downloading a model, it costs nothing to use.
- Better than closed - A closed fortune app would require sending data to servers. This keeps everything private, remixable, and works in air-gapped environments.
Try it out
bash
cd /home/cat/Projects/Ghost
./ghost-fortune
Configure with:
export GHOST_HOST="http://localhost:11434"
export GHOST_MODEL="llama-3.2:3b"
Or enable the full haunted experience:
export GHOST_SOUND=1
export GHOST_VOICE=1
./ghost-fortune
This project remembers the forgotten corners of computing history. On nights like these, when the line between past and present grows thin, the old terminals whisper back.
The machine is never truly quiet. 👻
Top comments (0)