Poltergeist — an open-weight ghost that haunts your terminal 👻 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. 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 Poltergeist possesses your zsh. A 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. 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. The 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. All screenshots are real output from the local 1B model. Orange whispers are reactions to sins, purple ones to everything else. The haunting. The ghost answers each command a moment after the prompt returns: ofrenda . An altar for everything that died in this shell, with an epitaph for each: seance . It read my history. It remembers node modules : ghost status . The restlessness meter and the record of sins: A local, open-weight ghost that haunts your shell. Poltergeist 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. ~/app ❯ git push --force origin main ~ Third force push this week. The old commits are still screaming, you know ~/app ❯ npm run build ~ Exit code 1. I've been collecting them. This one is my favorite. | Command | What it does | |---|---| | automatic | Whispers under your prompt after failures, sins, and at random. Runs async, so your prompt never waits. | | seance | Sit down and talk to the ghost. It has read your history and will bring it up. | | ofrenda | | Install is four lines: ollama pull llama3.2:1b git clone https://github.com/RathnamS089/poltegerist.git ~/poltergeist echo 'source ~/poltergeist/poltergeist.zsh' ~/.zshrc exec zsh 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. Your 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. Running an open-weight model locally made this project possible, not just nicer: ~/.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 . The 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: You think I've forgiven? You think a simple kill command makes me forget the pain of 4242's death. It 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. Light a candle for your node modules . 🕯