Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

haunted-shell: a tiny local ghost that whispers about my shell commands

Description and use

haunted-shell is a local tool that adds short, eerie comments to shell commands using an open‑weight LLM. It runs offline, never writes commands to disk, and keeps command history private.

Problem

Shell commands contain sensitive information; sending them to a cloud API risks privacy. Users want a local, private, offline tool that can add fun commentary without exposing commands.

Outcome

The tool provides private, offline, whimsical feedback on shell commands, improving user experience while preserving privacy. It runs on a 2‑core VM with 1.5 B model in 2–5 s per whisper, and can be throttled to reduce CPU usage.

Workflow

  • Set up the tool via pip and optional Ollama pull
  • Add the PROMPT_COMMAND hook to ~/.bashrc
  • Execute shell commands; the hook captures the last command and exit code
  • The hook calls haunt whisper in the background
  • The local model generates a short comment
  • The comment is printed dim and italic with a 👻 prefix

Evidence

haunted-shell is a tiny ghost that possesses my terminal. A shell hook watches each command I run, and a small open‑weight model on my own machine whispers back one short, eerie comment.

Source

The first version used the exact same model as lazycommit: Qwen2.5-Coder 0.5B Instruct, about 400 MB. For commit messages it worked well in the Week 3 tests, where it picked the right Conventional Commit type on all three real commits. In the ghost test runs it just repeated the input back like a court stenographer.

Source

On a 2‑core VM with the model on CPU, one whisper took about 2 to 5 seconds.

Source

Because the model is open‑weight and runs on my own machine: Private: with the default configuration, whispers are generated on loopback only and the tool never writes command text to disk.

Source

  • Record date: 2026-11-02T00:44:04.568Z