DEV Community

Mohit
Mohit

Posted on

Haunted Terminal: A Local AI Specter Possessing Your CLI ๐ŸŽƒ

Haunted Terminal ๐Ÿ‘ป

A local AI CLI tool that possesses your shell prompt and whispers back eerie, witty commentary on your terminal commands using Ollama.

Demo

Code

GitHub logo mohit-saini-dev / haunted-terminal

A spooky, local AI CLI tool that possesses your terminal and gives sarcastic commentary on your shell commands using Ollama.

# ๐Ÿ‘ป Haunted Terminal

> A spooky, local AI CLI tool that possesses your terminal and gives sarcastic commentary on your shell commands using Ollama.

Built for the **Hacktoberfest 2026 Week 4: Ghost in the Machine** challenge.

---

## ๐ŸŽƒ Features
- **Local AI Inference:** Powered completely offline by [Ollama](https://ollama.com) running open-weight models (`qwen2.5-coder:7b`).
- **Terminal Possession:** Intercepts commands, error logs, and git snippets, turning boring terminal outputs into an eerie experience.
- **Zero Heavy Dependencies:** Built with pure Python standard libraries (`urllib`, `json`, `sys`).

---

## ๐Ÿ› ๏ธ Installation & Setup

1. Make sure **Ollama** is installed and running locally on your machine:
   ```bash
   ollama run qwen2.5-coder:7b
Enter fullscreen mode Exit fullscreen mode
  1. Clone the repository:
git clone [https://github.com/mohit-saini-dev/haunted-terminal.git](https://github.com/mohit-saini-dev/haunted-terminal.git)
cd haunted-terminal
Enter fullscreen mode Exit fullscreen mode
  1. Run the tool withโ€ฆ

How I Built It

Haunted Terminal is a lightweight Python-based CLI tool designed to bring a spooky atmosphere to every developer's terminal session:

  • Local AI Inference Engine: Powered by Ollama running the qwen2.5-coder:7b open-weight model.
  • Zero-Dependency Core: Built using standard Python modules (urllib, json, sys), eliminating complex setup steps or external pip installs.
  • Agentic Workflow: Captures command-line arguments, structures an optimized system prompt targeting http://localhost:11434/api/generate, and parses the text into formatted terminal output.

Why Does Open Innovation Matter?

Leveraging open-weight models locally via Ollama highlights why open innovation in AI is crucial:

  1. Complete Data Privacy: Command histories, error logs, and repository paths stay strictly on your local deviceโ€”no sensitive data is sent to cloud LLM APIs.
  2. Offline Resilience: Works 100% offline without requiring internet access or third-party service uptime.
  3. Zero API Overhead: Allows developers to experiment and build interactive agentic tools without incurring token costs.

The Spirit of It

Every developer knows the sudden chill of accidentally running rm -rf on a folder or force-pushing to main. Haunted Terminal takes those moments of panic and turns them into a playful, haunted experienceโ€”reminding us that behind every terminal window, the ghosts of past commits are always watching.

Top comments (0)