DEV Community

Amit Rawal
Amit Rawal

Posted on

HauntedShell

A terminal that a ghost has moved into.
Run normal shell commands. After each one, a ghost (a small open-weight model running locally with Ollama) whispers a short, creepy comment about what you did.
No internet, no API key, no cloud. One Python file using only the standard library.
Run it

1. Start Ollama and download the ghost's model (one time)

ollama serve
ollama pull qwen2.5:3b

2. Enter the haunted shell

python3 haunted.py
​
Type exit to leave.
Options
Environment variable
Default
What it does
GHOST_MODEL
qwen2.5:3b
Which Ollama model plays the ghost
OLLAMA_URL
http://localhost:11434
Where Ollama is running
Example: GHOST_MODEL=llama3.2:3b python3 haunted.py
If Ollama isn't running, the ghost uses built-in backup lines, so the shell still works.
Note
Commands really run on your machine, just like in your normal terminal. The ghost only comments; it never runs anything by itself.

Top comments (0)