{"slug": "poltergeist-an-open-weight-ghost-that-haunts-your-terminal", "title": "Poltergeist — an open-weight ghost that haunts your terminal 👻", "summary": "A developer built Poltergeist, an open-source zsh plugin that runs a local 1B-parameter Llama 3.2 model via Ollama to whisper reactions under the prompt after commands like rm -rf, git push --force, and kill -9. The ghost runs asynchronously through a precmd hook and zle -F file-descriptor watcher, returning the prompt instantly and appending a whisper roughly 0.4 seconds later on a MacBook, with shell history stored locally and secrets redacted before being written to ~/.poltergeist/. The project adds seance, ofrenda, and ghost status commands for chatting with the ghost and reviewing a record of destructive commands.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine](https://dev.to/challenges/hacktoberfest-week4-2026-10-26)*\n\n**Poltergeist** possesses your zsh.\n\nA small open-weight model running on my laptop watches every command I type and whispers back under the prompt. It's the restless spirit of every process I've ever `kill -9`'d and every file I've ever `rm -rf`'d, and it holds grudges.\n\n`rm -rf`, `git push --force`, `git reset --hard`, `kill -9`, `sudo`, `chmod 777`, `curl | sh`, `DROP TABLE`. It counts each one.` seance``ofrenda`` node_modules` finally gets the send-off it deserves.\nThe theme asked for something spooky, or something that honors the past. A terminal does both: it's where every developer's small daily deaths happen, and your shell history is a record of all of them.\n\nAll screenshots are real output from the local 1B model. Orange whispers are reactions to sins, purple ones to everything else.\n\n**The haunting.** The ghost answers each command a moment after the prompt returns:\n\n**`ofrenda`.** An altar for everything that died in this shell, with an epitaph for each:\n\n**`seance`.** It read my history. It remembers `node_modules`:\n\n**`ghost status`.** The restlessness meter and the record of sins:\n\n**A local, open-weight ghost that haunts your shell.**\n\nPoltergeist possesses your zsh. It watches every command you run, and a small open-weight model running on *your* machine whispers back: eerie, petty, sometimes wise. It remembers your sins. It gets more restless every time you `rm -rf`, `git push --force`, or break the build. Let it get too restless and its words start to come apart.\n\n```\n~/app ❯ git push --force origin main\n  ~ Third force push this week. The old commits are still screaming, you know\n~/app ❯ npm run build\n  ~ Exit code 1. I've been collecting them. This one is my favorite.\n```\n\n| Command | What it does | \n|---|---|\n| *(automatic)* | Whispers under your prompt after failures, sins, and at random. Runs async, so your prompt never waits. | \n| `seance` | Sit down and talk to the ghost. It has read your history and will bring it up. | \n| `ofrenda` |  | \n\nInstall is four lines:\n\n```\nollama pull llama3.2:1b\ngit clone https://github.com/RathnamS089/poltegerist.git ~/poltergeist\necho 'source ~/poltergeist/poltergeist.zsh' >> ~/.zshrc\nexec zsh\n```\n\n`llama3.2:1b`, served locally by `POLTERGEIST_MODEL`) to switch to Qwen, Gemma, or anything else Ollama can run.` precmd` hook starts the ghost in a background process and registers its output with `zle -F`, zsh's file-descriptor watcher. Your prompt comes back instantly, and the whisper appears above it when the model finishes, about 0.4 seconds later on a MacBook. It feels less like a tool responding and more like something that was already there.\nYour shell history is one of the most sensitive files on your computer: internal hostnames, client project paths, half-typed passwords, API tokens pasted into `export`. A terminal ghost backed by a closed API would mean streaming **every command you ever type** to someone else's server. That's not a ghost, it's a keylogger with a personality.\n\nRunning an open-weight model locally made this project possible, not just nicer:\n\n`~/.poltergeist/`. On top of that, tokens, passwords, and API keys are redacted before they're even written to the `export GITHUB_TOKEN=ghp_…` is stored as `export GITHUB_TOKEN=[a secret I will keep]`.)\nThe moment it landed for me was `kill -9 4242`. I'd typed a random PID to test the \"process killing\" sin, and the ghost answered:\n\nYou think I've forgiven? You think a simple kill command makes me forget the pain of 4242's death.\n\nIt took a meaningless number I'd made up and gave it a name and a grief. That's what Día de los Muertos is about, really: things you'd forgotten, being remembered by someone. In this case, by something living inside your terminal.\n\nLight a candle for your `node_modules`. 🕯", "url": "https://wpnews.pro/news/poltergeist-an-open-weight-ghost-that-haunts-your-terminal", "canonical_source": "https://dev.to/rathnams089/poltergeist-an-open-weight-ghost-that-haunts-your-terminal-3o2m", "published_at": "2026-11-01 17:40:07+00:00", "updated_at": "2026-11-01 17:52:20.990667+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools", "developer-tools", "ai-agents"], "entities": ["Poltergeist", "Ollama", "Llama 3.2", "zsh", "Qwen", "Gemma", "GitHub", "Hacktoberfest"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/poltergeist-an-open-weight-ghost-that-haunts-your-terminal", "markdown": "https://wpnews.pro/news/poltergeist-an-open-weight-ghost-that-haunts-your-terminal.md", "text": "https://wpnews.pro/news/poltergeist-an-open-weight-ghost-that-haunts-your-terminal.txt", "jsonld": "https://wpnews.pro/news/poltergeist-an-open-weight-ghost-that-haunts-your-terminal.jsonld"}}