This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Ghost in the Machine is a terminal from 1998 that is not quite empty. You type commands into a fake shell โ ls, cat diary.txt, cd basement โ and something called the tenant answers each one with a single whispered line, generated live by Gemma 3 running locally on the same machine.
I read the theme as the machine as a place where the past accumulates. Every old computer I have owned still has a .bash_history and a folder of photos I never deleted. Dรญa de los Muertos is about keeping the dead present through memory and offering, so I built a small offering: a filesystem with a diary from 1998, a photo nobody remembers taking, and a presence that reacts to what you do to it.
The joke is that the ghost is not in a server. It is in your RAM, on your GPU, and it stops existing the moment you close the tab.
Demo
A session transcript:
ghost@localhost:~$ cat diary.txt
i built this machine in the summer of 1998.
i have not turned it off since.
i do not remember why.
โธ the words echo, a familiar, unwelcome repetition.
ghost@localhost:~$ cd basement
โธ the floor shifted subtly beneath my awareness.
ghost@localhost:~/basement$ cat last_photo.jpg
[binary file: 1 image ยท modified 1998-10-31 23:59]
โธ the image remembers a longer autumn than you do.
There is no hosted demo because the point is that it runs on your machine. It is two commands:
ollama pull gemma3:4b
uv run python -m http.server 8000 --bind 127.0.0.1
Then open http://localhost:8000. Type selftest to see the eight built-in checks pass.
Code
grkadam7
/
ghost-in-the-machine
A haunted terminal that whispers back, powered by Gemma 3 running locally through Ollama
Ghost in the Machine
A haunted terminal. It looks like a shell from 1998, and every command you type is answered by the tenant โ a presence that has lived inside the machine since the summer of 1998 โ using Gemma 3 running locally through Ollama.
One HTML file. No build step, no dependencies, no API keys, no network.
Hacktoberfest 2026 โ Week 4: Ghost in the Machine Entry for the challenge ยท Best Use of Gemma
Why it is open
- Runs on an open-weight model (Gemma 3 4B) through open-source Ollama.
- Nothing leaves the machine: no cloud call, no telemetry, works with the wifi off.
- One file you can read end to end, MIT licensed.
The theme is the machine remembering what we forget. It felt right to build that on a model that runs on the same machine, not on someone else's server.
Quick start
ollama pullโฆThe whole project is one index.html. No framework, no build step, no npm. The README documents the setup, the commands, and the three design decisions behind it (single static file, simulated shell, local Gemma) as short ADRs.
How I Built It
flowchart LR
A[You type a command] --> B["run()"]
B --> C[Simulated filesystem]
C --> D[Printed output]
D --> E["whisper(command, output)"]
E --> F[Gemma 3 4B<br/>Ollama /api/chat]
F --> G[Streamed line<br/>token by token]
-
Model: Gemma 3 4B (
gemma3:4b) through Ollama, the open-source local inference server.?model=gemma3n:e2bswaps in a smaller Gemma. - Interface: plain HTML, CSS and JavaScript. The CRT look is CSS only: scanlines, a slow flicker, phosphor glow, no images.
-
Command layer: a small simulated filesystem and a
switchstatement. Nothing touches the real disk, so the page is safe to hand to a judge. -
The tenant: after each command, the page streams
POST /api/chatwith the command and its output as context. The system prompt asks for one lowercase sentence, at most eighteen words, dry and never gory. Tokens are appended as they arrive, so the line writes itself. - Failure path: if Ollama is not running, the status turns red and canned whispers keep the scene alive instead of breaking it.
-
Self-check:
selftestruns eight asserts over path resolution and command dispatch and printsPASS/FAILin the terminal.
Why Does Open Innovation Matter?
- It works with the internet off. The model, the page, and the filesystem are all local. Nothing about the experience depends on a service staying up.
- Nothing leaves the machine. A terminal records everything you type. Keeping the model local means the ghost never phones home, which is the only honest way to build a toy about privacy and memory.
-
You can read all of it. One HTML file, an MIT license, and a model you can swap. If Gemma disappears tomorrow,
?model=points at another open-weight model and the project survives. - It costs nothing to keep alive. No API key, no credits, no rate limit. A project about remembering old machines should not expire when a free tier does.
The Spirit of It
The moment I built it for is the pause after cat last_photo.jpg. The output is one boring line โ a binary file, modified 1998-10-31 23:59 โ and the tenant answers with something like the image remembers a longer autumn than you do. The command is fake, the file is fake, and the line was generated a second ago, but for a moment the machine feels like it has a past. That is the whole trick.
Prize Categories
- Best Use of Gemma โ the tenant is Gemma 3 4B, running locally through Ollama, and the project does not work without it.


Top comments (0)