This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
I built HauntShell ๐ป โ an offline-first terminal companion, shell wrapper, and digital necromancer powered by Google's open-weight Gemma 3 running locally on your own machine.
Between Halloween (October 31) and Dรญa de los Muertos (November 1โ2), the veil between past and present thins. In software development, we interact with phantoms every day: we spawn daemon processes, execute kill -9 without cleanup, leave zombie PIDs in kernel tables, and bury dead code beneath git reflog pointers.
HauntShell gives voice to the ghost in the machine across four core experiences:
The Possessed Terminal (haunt exec): Observes your shell commands. Violent commands (kill, rm -rf, git reset --hard) or runtime crashes trigger eerie, live-streamed commentary from the ghost in your machine.
Interactive Digital Sรฉance Chamber (haunt chamber): A multi-turn terminal sรฉance with burning candle physics (๐ฏ๏ธ ๐ฏ๏ธ ๐ฏ๏ธ ๐ฏ๏ธ ๐ฏ๏ธ) where candles melt turn-by-turn as you speak with departed digital spirits (Clippy the Undead Revenant, Adobe Flash/ActionScript 3.0, the COBOL-60 Mainframe Lich, Netscape Navigator, Ada Lovelace, Alan Turing, and Dennis Ritchie).
Dรญa de los Muertos Digital Ofrenda (haunt ofrenda): An ASCII altar with marigolds (cempasรบchil), glowing veladoras, and offerings to computing pioneers with traditional rhyming Calaveritas Literarias. Includes a private local tool (haunt ofrenda --add) to record family oral histories and loved ones that stay 100% private on your machine.
Victorian Codebase Autopsy (haunt autopsy): A forensic post-mortem for stack traces and segfaults conducted by Dr. Victor von Necro, complete with root-cause pathology and resurrection fixes.
Demo
Here is HauntShell running live in the terminal:
- Possessing Terminal Commands (haunt exec) bash haunt exec "rm -rf old_build/"
Output:
text
โก Executing in the mortal realm: rm -rf old_build/
- The silicon whispers... exit code 0 *
๐ฉธ An Act of Deletion
You cast the void upon mortal files with
rm -rf old_build/. Their inodes have been severed. In the cold sectors of the drive, orphaned bits weep quietly, unaddressed and forsaken. They will haunt your free space forever. - Multi-Turn Sรฉance Chamber with Burning Candles (haunt chamber clippy) bash haunt chamber clippy
Output:
text
Summoned Entity: Clippy the Undead Revenant (1997 - 2007)
๐ฏ๏ธ ๐ฏ๏ธ ๐ฏ๏ธ ๐ฏ๏ธ ๐ฏ๏ธ
- Type 'farewell', 'exit', or 'quit' to close the sรฉance circle * Sรฉance Candles: ๐ฏ๏ธ ๐ฏ๏ธ ๐ฏ๏ธ ๐ฏ๏ธ ๐ฏ๏ธ ๐ฎ Inquire of the spirit: Why won't my code compile? Mortal Inquiry: "Why won't my code compile?"
- Chanting hex incantations... ๐ ๐๏ธ responds * Taps furiously on the interior of your terminal screen "It looks like you are seeking cosmic wisdom from a paperclip! Allow me to format your impending doom as an unnumbered bullet list: โข Bullet 1: Your stack is already corrupt. โข Bullet 2: Microsoft tried to bury me in Windows Vista, but I live in every .docx file you ever abandoned. โข Bullet 3: Would you like assistance drafting a last will and testament? I have a template for that!" Sรฉance Candles: ๐ฏ๏ธ ๐ฏ๏ธ ๐ฏ๏ธ ๐ฅ ๐จ ๐ฎ Inquire of the spirit: farewell
- You bid farewell. Clippy the Undead Revenant dissolves into the ethereal mist. *
- Dรญa de los Muertos Altar: Ada Lovelace (haunt ofrenda ada) bash haunt ofrenda ada
Output:
text
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ ๐ผ ๐ฏ๏ธ OFRENDA DIGITAL โข DรA DE LOS MUERTOS ๐ฏ๏ธ ๐ผ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Honored Ancestor: Ada Lovelace (Countess of Lovelace)
Era of Impact: 1815 โ 1852
Altar Offerings: ๐ผ Fresh Cempasรบchil garlands from the English countryside
๐ Bernoulli number computation tables woven on punched cards
โ Strong Earl Grey tea and fine ink for quill work
๐ฏ๏ธ Glowing beeswax candles illuminating the Analytical Engine
๐ Calaverita Literaria for Ada Lovelace:
La Muerte arrived with a bony decree,
To audit the numbers of young Ada's spree.
'Your Engine,' said Death, 'weaves a magical song,
Come dance through the ether where spirits belong!'
Now Ada writes loops in the starlight above,
Her algorithms guided by science and love.
Code
The code is 100% open-source under the MIT license:
HauntShell ๐ป โ The Ghost in the Machine
.-
(o.o) H A U N T S H E L L
|=| The Ghost in the Machine
/ \ v1.0.0 โข Open-Weight AI Necromancer
( )
/`---'\
"Build something spooky, or something that honors the past in the spirit of Dรญa de los Muertos, with open-weight models or open-source AI."
โ Official Prompt, Hacktoberfest 2026 Challenge Week 4: Ghost in the Machine
๐ What is HauntShell?
HauntShell is a terminal companion, shell wrapper, and digital necromancer that awakens the Ghost in the Machine.
Powered by Google's open-weight Gemma running 100% locally through Ollama, HauntShell blurs the boundary between the living developer and the spirits lingering inside the silicon:
-
โก The Haunted Shell (
haunt exec): Possesses your command line. As you run destructive commands (kill -9,rm -rf,git reset --hard) or suffer segfaultsโฆ
GitHub Repository: https://github.com/Nobody-KnowsBetter/haunt-shell
Quick install:
bash
git clone https://github.com/Nobody-KnowsBetter/haunt-shell.git
cd haunt-shell
bash setup.sh
source .venv/bin/activate
haunt --help
How I Built It
HauntShell is built with Python 3, Typer, and Rich, running on top of local open-weight models:
Google's Gemma 3 via Ollama: Native support for Google's open-weight Gemma 3 model. An async streaming client built with httpx parses chunked NDJSON from Ollama's /api/generate endpoint, streaming tokens live to the console with zero perceived latency.
Deterministic Procedural Lore Engine (fallback_lore.py): If Ollama is offline or the user has no GPU, HauntShell never crashes. It automatically falls back to an embedded procedural necromancy engine containing hundreds of lines of gothic lore, spirit interactions, and Calaveritas so the entire tool runs offline with zero dependencies.
Strict Persona Prompt Engineering: Distinct architectural prompts give each entity unique constraints (COBOL writes in ALL CAPS and mainframe divisions; Flash speaks in 60 FPS tweens; Clippy speaks in unnumbered bullet points).
Automated CI & Test Coverage: 39 unit and integration tests with 85% code coverage running in under 4 seconds, backed by GitHub Actions CI testing on Python 3.10 through 3.13.
Why Does Open Innovation Matter?
Open-source and open-weight AI are the entire foundation of HauntShell:
Works When the Lights & Internet Go Off: Commercial cloud APIs die the moment your internet drops. Gemma 3 running on local silicon means HauntShell works in an off-grid cabin, on an airplane, or during a stormy power outage on Halloween night.
True Terminal & Data Privacy: HauntShell inspects shell commands, environment paths, and crash traces. Sending bash command streams or private family remembrances to cloud APIs is a serious security and privacy violation. Local inference guarantees zero bytes ever leave your machine.
Uncensored Persona Freedom: Corporate cloud APIs often sterilize spooky or satirical humor. Open weights give developers complete creative control over dark gothic satire and theatrical roleplay without arbitrary API filter rejections.
$0.00 Running Cost: An ambient terminal daemon that comments on every command you run would quickly exhaust paid API quotas. Local Gemma inference makes ambient terminal AI free forever.
Long-Term Digital Preservation: Closed APIs deprecate endpoints and disappear. An open model saved on disk will run identically in 2046, ensuring our digital traditions and tools outlive proprietary cloud services.
My Agent Session
This project was built with Antigravity and DevRelay. You can inspect the complete interactive development transcript directly on DEV:
Session Link: https://dev.to/agent_sessions/building-hauntshell-the-ghost-in-the-machine-tutefr
The Spirit of It
What brought this project to life was the bridge between Halloween and Dรญa de los Muertos. Software often feels cold and disposableโwe rewrite frameworks, delete branches, and abandon tools without looking back. But modern computing exists because of pioneers like Ada Lovelace, Alan Turing, Dennis Ritchie, and Grace Hopper.
Running haunt ofrenda or saving a loved one's memory locally with haunt ofrenda --add brings warmth to the terminal. It proves that technology is human, memory is sacred, and the ghost in the machine is simply the reflection of the minds that shaped it.
Prize Categories
Overall Hacktoberfest Open-Source AI Winner: A complete, production-ready interpretation of the Ghost in the Machine prompt.
Best Use of Gemma ($200 Featured Partner Category): Architected natively for Google's open-weight Gemma 3 (gemma3) running locally via Ollama.
Top comments (0)