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

I Haunted My Terminal With a Local Ghost (Gemma 3, No Internet Needed)

说明与用途

本地终端幽灵,在执行命令后发出短句,所有数据保持在本机。

问题

Add whimsical, local AI-generated whispers to terminal commands without exposing sensitive data to external services.

结果

A lightweight, privacy‑preserving terminal enhancement that injects one‑line spooky comments after commands, using only local resources and no internet.

工作流

  • 1. Install Ollama and pull a local model (e.g., gemma3:4b).
  • 2. Run python3 ghost.py "<command>" --code <exit_code>.
  • 3. Source haunt.zsh in the shell to hook preexec and precmd.
  • 4. The script rolls a die; if the ghost is chatty, it calls the local model via Ollama’s HTTP API.
  • 5. The model returns a single short whisper, printed to the terminal.
  • 6. Optionally set GHOST_ODDS=1 to trigger after every command.

证据

Two tiny files, no dependencies beyond Python 3 and zsh:

来源

The whole prompt is a few lines: you are a ghost trapped inside a computer, reply with one short eerie whisper, spooky and a little funny.

来源

Nothing leaves your machine. The only network call is to localhost.

来源

It works offline. Plane, train, or a dead Wi‑Fi: the ghost still haunts you.

来源

  • 记录日期: 2026-10-27T00:11:24.689Z