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

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

说明与用途

haunted-shell 是一个本地工具,使用开放权重 LLM 为 shell 命令添加短暂的“幽灵”评论。它完全离线运行,永不写入命令到磁盘,保持命令历史私密。

问题

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.

结果

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.

工作流

  • 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

证据

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.

来源

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.

来源

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

来源

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.

来源

  • 记录日期: 2026-11-02T00:44:04.568Z