This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
For this year's DÃa de los Muertos build, I made a haunted browser terminal called Open Haunt AI.
You type commands—ls -la, git status, sudo rm -rf /—into a CRT-green shell complete with scanlines and marigold accents. Nothing actually executes on your operating system: the fake shell prints plausible canned output. But after every command, a spirit whispers a one-line eerie commentary about what you just did:
sudo rm -rf /→ "Ominous grin spreads across my specter, warning of the ancient chaos this command could unleash."
The interesting part isn't the theatrics. It's that the entire ghost runs on your own machine, on an open-weight model, with zero API keys, zero cloud calls, and zero data leaving the box.
Demo
- Repository & Setup Guide: github.com/varshith2000/open-haunt-ai
-
Local Run: Download and launch the Docker container or local start script; it serves the interactive CRT shell directly to
localhost.
Code
varshith2000
/
open-haunt-ai
Built with Freebuff Cloud
🕯 Ghost in the Machine
A haunted shell where an open-weight model running entirely on your machine whispers eerie commentary on every command you type.
Nothing executes. Type sudo rm -rf /, git status, docker ps, man ghost — whatever you like — and the terminal prints plausible (canned) output, then streams a one-or-two-sentence whisper from a local spirit about what you just did. The ghost is Qwen2.5-3B-Instruct, served by Ollama, on your own hardware, with no API keys and no network calls. Built for Halloween / DÃa de los Muertos: the ghost is fond of marigolds, candles, and ofrendas.
Quickstart
Option A — Docker (everything included)
docker build -t ghost-in-the-machine .
docker run -p 3000:3000 ghost-in-the-machine
# open http://localhost:3000
The model is baked into the image. After the build, it runs with the internet off.
Option B — from source
-
Install Ollama and pull the…
How I Built It
The Séance Stack
- Ollama serving Qwen2.5-3B-Instruct: Apache-2.0 licensed, 1.9 GB, downloaded once and run forever.
- Next.js 15 + TypeScript + Tailwind CSS: For the retro CRT terminal UI, scanlines, and marigold accents.
- Streaming Route: One thin API route that streams Ollama's token output directly to the browser as the whisper materializes.
-
Modular Design: The ghost's entire personality is contained in a single file (
persona.ts); the fake shell simulator is another (commands.ts); a startup script wakes Ollama, confirms the model is loaded, and serves the app. - Dockerized Weights: A Dockerfile that bakes the model weights into the container image for zero-friction distribution.
-
Zero Cloud Footprint: No external database, no telemetry, and no account requirements. Your transcript lives in
localStorageand dies when you close the tab.
Why Does Open Innovation Matter?
1. It Runs With the Lights (and Internet) Off
At runtime, the app makes exactly zero outbound calls. The model consists of files on disk, Ollama runs as a local process, and the frontend talks solely to localhost. Pull the Ethernet cable or turn off Wi-Fi, and the experience remains byte-for-byte identical. Closed APIs turn into dead screens when disconnected; open innovation keeps the ghost whispering in the dark.
2. Privacy as Physics, Not Policy
The reason sensitive logs, documents, or personal stories can be processed safely by an open model is that the data never leaves the hardware. It stops being a policy question ("we promise not to train on your data") and becomes a physics question: data never crosses a wire, so there is nothing to intercept, leak, subpoena, or sell.
3. Freedom From Vendor Deprecation
Closed APIs mean renting endpoints that can be shut down, modified, or repriced at any moment. With open-source AI, the identity of the project belongs to files I own. If Ollama vanished tomorrow, I could swap to llama.cpp or vLLM. If the model needs to run on constrained hardware, a single environment variable (OLLAMA_MODEL=qwen2.5:1.5b-instruct) swaps the brain seamlessly.
4. Debugging Down to the Metal
When whispers were initially crawling at 0.19 tokens/sec and truncating mid-sentence, open access let me inspect the container environment directly. The issue: the host container advertised 64 CPUs, but the cgroup quota granted only 2. The local inference engine was spawning 64 threads against a 2-CPU budget and thrashing. Capping num_thread to match the actual cgroup quota turned a 90-second hang into 13 seconds of fluent text—a ~95× speedup. You cannot inspect or tune that level of inference mechanics behind a closed commercial endpoint.
The Spirit of It
Open innovation isn't just nostalgia for self-hosting. It's the only architecture where the lights can go out, the network can drop, the vendor can vanish, and the ghost still whispers from inside the machine.
Top comments (0)