This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Haunted Terminal is a shell wrapper where a ghost whispers about every command you run. After each command, a local open-weight model (Gemma 3 1B via Ollama) reads what you ran and replies with one eerie sentence. I took the theme literally: a ghost living inside the machine, watching your work. It also runs as a haunt command on my terminal-style portfolio.
Demo
Live: https://skd-33.github.io/portfolio. Type haunt, then run any command like projects or skills. The page turns purple and a ghost line appears under each output. The full experience with a real local model is haunt.py, and the README has an example session.
Code
https://github.com/skd-33/haunted-terminal
How I Built It
haunt.py is one Python file with no dependencies. It runs your command, captures the output, and sends the command plus the last 300 characters of output to gemma3:1b through Ollama's local API. The prompt asks for one short, spooky sentence, which is typed out under the output. If Ollama isn't running, an offline fallback ghost steps in, so the terminal never breaks. The web version does the same from the browser, and falls back to built-in lines when no local model is reachable. I used GitHub Copilot and Claude to speed up the build.
Why Does Open Innovation Matter?
Every command you type goes to a model on your own machine, and nothing is sent to a server. It works with the internet off and costs nothing per command. Because the model is open-weight, I can swap gemma3:1b for qwen2.5-coder:3b with one environment variable. A closed API would have seen every command you typed.
The Spirit of It
I wanted the terminal to feel haunted, as if old commands and logs were watching you. The ghost reads your actual work and reacts to it.
Prize Categories
Best Use of Gemma
Top comments (0)