Home / use case

Ghost in the Machine: a fake 1998 terminal where a local Gemma 3 whispers back at every command

At a glance
Models & engines
Ollama with gemma3:4b (or gemma3n:e2b via ?model=)
Key gotcha
If Ollama isn't running, the status turns red and canned whispers keep the scene alive instead of breaking it.

What they built

grkadam7 built a terminal from 1998 that isn't quite empty, for the Hacktoberfest Open-Source AI Challenge's Ghost in the Machine week. You type commands like ls, cat diary.txt or cd basement into a fake shell.

After each command, something called the tenant answers with a single whispered line, generated live by Gemma 3 running on the same machine.

The whole project is one index.html with no framework, build step or npm, MIT licensed, with a README that records its three design decisions.

Setup

  • Ollama with gemma3:4b (or gemma3n:e2b via ?model=)
  • One HTML file served locally with `uv run python -m http.server 8000 --bind 127.0.0.1`
  • Plain HTML, CSS and JavaScript; the CRT look is CSS only

How it works

  1. A small simulated filesystem and a switch statement handle commands, so nothing touches the real disk.
  2. After each command the page streams POST /api/chat with the command and its output as context.
  3. The system prompt asks for one lowercase sentence of at most eighteen words, dry and never gory, and tokens are appended as they arrive.
  4. A selftest command runs eight asserts over path resolution and command dispatch.

Results & numbers

  • It works with the internet off and costs nothing to keep running: no API key, credits or rate limit.
  • If Gemma disappears, ?model= points it at another open-weight model.

Gotchas

  • If Ollama isn't running, the status turns red and canned whispers keep the scene alive instead of breaking it.
“The joke is that the ghost is not in a server. It is in your RAM, on your GPU”— grkadam7

Do it yourself

  1. Install Ollama and run `ollama pull gemma3:4b`.
  2. Clone the project and serve it with `uv run python -m http.server 8000 --bind 127.0.0.1`.
  3. Open http://localhost:8000 and type selftest to check that it works.
  4. Type commands like ls or cat diary.txt and watch the tenant reply.
Source: grkadam7 (DEV Community) · Published 2026-10-31 · Added 2026-11-04. This write-up summarizes the original source; see it for full details.

Similar setups

Haunted Haiku: a local Gemma 3 poet that also designs the card

E. Smith built a small Dash app where a local Gemma 3 in Ollama writes an eerie haiku and picks its colours and emoji in one JSON reply, so the poem and its picture work with Wi-Fi off.

E. Smith (DEV Community) · 2026-10-30

Ofrenda Keeper: local Gemma 3 makes a Día de los Muertos card from only what you said

hongpengtan0-max built Ofrenda Keeper, a local app where Gemma 3 4B in Ollama turns what you tell it about someone you miss into an altar card, and plain code removes any detail you didn't actually say.

hongpengtan0-max (DEV Community) · 2026-10-28

Constraint Kitchen: a Gemma 3 1B DIY idea generator that refuses rather than lies

Shashwat Sinha built a local app that turns household junk into DIY project ideas and build guides with gemma3:1b on an 8 GB M3 Mac, and checks every answer in Python so it refuses when the model breaks your constraints.

Shashwat Sinha (DEV Community) · 2026-10-23

ShelfReady: a private Amazon KDP listing studio running Gemma 3 4B on a CPU

A designer and colouring-book publisher built ShelfReady to draft Amazon KDP titles, keywords and descriptions with Gemma 3 4B in Ollama, then check every field against KDP's rules in code, on an ordinary 8-core CPU with no GPU.

Cody Topp (DEV Community) · 2026-10-21