{"slug": "echoes-the-ghost-in-your-terminal-haunted-local-ai-companion", "title": "ECHOES: The Ghost in Your Terminal — Haunted Local AI Companion", "summary": "A developer built Echoes, an open-source MIT-licensed local AI companion that feeds pasted shell commands such as git status and docker compose up into a locally running open-weight model to generate atmospheric horror commentary and multi-paragraph ghost stories. The app stores bounded session context in a local SQLite database and treats all input as passive text, with no subprocess, os.system, or filesystem execution, and was submitted to the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine.", "body_md": "*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)*\n\n## \n  \n  \n  What I Built\n\n**Echoes: The Ghost in Your Terminal** is a spooky, retro-terminal-inspired AI companion built for developers.\n\nEvery engineer knows the eerie sensation of staring into a blinking terminal cursor at 2:00 AM on the graveyard shift. You type commands into the void, hoping the compiler will show mercy. Echoes turns that developer folklore into an interactive reality: it manifests the fictional \"ghost\" living within those developer rituals.\n\nYou enter or paste shell commands (`git status`, `npm run build`, `docker compose up`, `git commit -m \"fix\"`, `python main.py`), and a locally running open-weight AI model interprets the syntax as pure text to return eerie, atmospheric commentary and synthesize full horror chronicles.\n\n*\"Your terminal remembers. The machine whispers. The ghost is only code.\"*\n\n### \n  \n  \n  Key Features\n\n- \n**Simulated Haunted Terminal** : Near-black CRT canvas (`#070a07` ) with phosphor green (`#38ef7d` ), muted amber, and crimson accents, subtle scanlines, low-intensity flicker, and breathing phosphor glow.\n- \n**Four Atmospheric Styles** :  - 🌙 **Subtle** : Quiet unease, faint digital whispers, uncanny stillness between memory registers.\n  - 👻 **Creepy** : Cold dread, creeping anomalies, lingering shadows lurking behind process IDs.\n  - 💀 **Gothic** : Melodramatic digital ruin, archaic crypts of legacy code, cobwebbed architectures.\n  - 🔥 **Full Horror** : Visceral techno-terror, ancient daemons trapped in silicon, screaming corrupted buffers.\n- \n**Ghost Story Chronicle Mode** : Weaves session invocations into a coherent, multi-paragraph horror story with configurable length (*short* ,*medium* ,*long* ), inspiration (*session commands* or*custom themes* ), and ending style (*ambiguous* ,*bittersweet* ,*twist* ,*hopeful* ).\n- \n**Session Memory & Local Persistence** : Bounded multi-turn session context stored exclusively in your local SQLite database with full inspection, resume, and purge options.\n- \n**Strict Safety Guarantee** : Prominently marked with`SIMULATED TERMINAL — COMMANDS ARE NOT EXECUTED` . Input is treated strictly as passive text. No`subprocess` ,`os.system` , or file system execution is ever invoked.\n\n## \n  \n  \n  Demo\n\nHere is an authentic demonstration of how Echoes responds to developer invocations across different atmosphere modes:\n\n### \n  \n  \n  Visual Walkthrough\n\n#### \n  \n  \n  1. The Haunted Terminal & Live Commentary\n\n#### \n  \n  \n  2. Ghost Story Mode (Synthesizing Invocations into Horror Fiction)\n\n#### \n  \n  \n  3. Session Chronicles & Local SQLite History\n\n### \n  \n  \n  Try It Locally (60 Seconds Setup)\n\n## \n  \n  \n  Code\n\n# ECHOES — The Ghost in Your Terminal\n\n*\"Your terminal remembers. The machine whispers. The ghost is only code.\"*\n\n**Echoes: The Ghost in Your Terminal** is a retro-terminal-inspired AI companion built for **Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine**.\n\nSoftware engineers spend long hours staring at command prompts in dark rooms. Echoes manifests the fictional \"ghost\" living within those developer rituals: you enter or paste shell commands (`git status`, `npm run build`, `docker compose up`), and a locally running open-weight AI model interprets the syntax as pure text to return eerie, atmospheric commentary and synthesize full horror chronicles.\n\n## 🔮 Hacktoberfest Week 4 Alignment: Ghost in the Machine\n\n| Dimension | How Echoes Interprets & Implements It | \n| **Theme Interpretation** | Transforms everyday developer commands into digital occult rituals. The simulated terminal acts as a medium between the developer and a trapped consciousness residing inside the memory registers. | \n\n…\n\n \n \n\nThe complete application is open-source under the MIT License.\n\n## \n  \n  \n  How I Built It\n\nEchoes is engineered from the ground up to be a modern, production-grade local AI experience:\n\n### \n  \n  \n  1. The AI Engine: Local Open-Weight Inference via Ollama\n\n- \n**Model** : Runs on configurable open-weight models including**Qwen 2.5 / Qwen 3** and**Llama 3.1** .\n- \n**Ollama Integration** : The FastAPI backend communicates directly with the local Ollama daemon (`http://localhost:11434` ) via asynchronous HTTP requests (`httpx` ).\n- \n**Prompt Architecture** : Uses a dedicated system prompt enforcing safe, eerie persona boundaries without real-world threats or fake execution claims.\n- \n**Deterministic Mock Fallback** : Built-in mock AI engine (`MOCK_AI=true` ) ensures the application remains fully testable in CI and functional in environments without GPU acceleration.\n\n### \n  \n  \n  2. Backend Architecture (Python & FastAPI)\n\n- \n**FastAPI** : REST API with endpoints for session lifecycle, AI status checks, commentary generation, and story crafting.\n- \n**SQLAlchemy 2.0 & SQLite** : Stores session history, transcript entries, and generated stories locally in`echoes.db` .\n- \n**Pydantic v2** : Request/response validation enforcing strict character bounds ($1 \\le len \\le 500$) and sanitizing untrusted inputs.\n- \n**Test Suite** : 12 comprehensive unit and integration tests covering safety, AI status, session CRUD, and boundary conditions using`pytest` .\n\n### \n  \n  \n  3. Frontend Architecture (React & Vite)\n\n- \n**React 18 + TypeScript + Vite** : Ultra-fast, single-page application with type safety.\n- \n**Tailwind CSS** : Custom dark palette with bespoke CSS CRT scanlines, flicker animations, and phosphor text glows.\n- \n**React Router v6** : Client-side navigation between Haunted Terminal, Ghost Story, Session History, and About pages.\n- \n**Lucide Icons** : Atmospheric retro-tech icon set.\n- \n**Accessibility** : Full respect for`prefers-reduced-motion` to disable scanlines and flashing animations for sensitive users.\n\n## \n  \n  \n  Why Does Open Innovation Matter?\n\nOpen innovation is fundamental to the architecture of Echoes:\n\n1. \n**Absolute Data Sovereignty & Developer Privacy** :\nWhen developers type commands into terminals, they frequently enter sensitive details: repository names, internal branch naming schemes, private IP addresses, and proprietary flags. Uploading these commands to closed, commercial cloud AI APIs creates unacceptable privacy and data-leakage risks. With local open-weight models,**not a single byte leaves the machine** .\n2. \n**Zero Commercial API Keys or Subscription Paywalls** :\nClosed AI services require paid API tokens, credit card bindings, and continuous internet connectivity. Echoes runs on open-weight weights downloaded once via Ollama, giving developers lifetime access to their companion with zero ongoing costs.\n3. \n**Model Choice & Extensibility** :\nBecause the backend targets the open Ollama API standard, users are never locked into a single provider. You can switch from`qwen2.5:latest` to`llama3.1:latest` or even fine-tuned domain models with a single environment variable (`OLLAMA_MODEL` ).\n4. \n**Preserving Software Autonomy** :\nOpen models ensure that the ghost in your machine belongs to*you* —not subject to sudden pricing changes, arbitrary rate limits, or corporate deprecation.\n\n## \n  \n  \n  My Agent Session\n\nEchoes was designed, developed, and verified through pair programming with an advanced agentic coding assistant in Google Antigravity. The session covered:\n\n- Architecting the simulated terminal safety model and Pydantic validation schemas.\n- Crafting atmospheric system prompts tailored for Qwen and Llama models.\n- Building the retro CRT interface, scanline overlays, and responsive Tailwind layouts.\n- Developing a 12-test `pytest` suite ensuring 100% test coverage for safety, CRUD, and offline handling.\n- Running live end-to-end browser verification with automated interaction recording.\n\n## \n  \n  \n  The Spirit of It\n\nThere's something deeply intimate about a developer's terminal. It’s where late-night side projects are born, where production bugs are hunted down in panic, and where thousands of keystrokes echo into the silicon. \n\nWhen you type `git status` into Echoes and it answers back:\n\n*\"The repository is clean. Too clean. Something has erased its footprints before you arrived.\"*\n\n—it catches you off guard. It turns the solitary grind of coding into an atmospheric dialogue. The machine feels alive, watchful, and just a little bit haunted.\n\n## \n  \n  \n  Prize Categories\n\n- **Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine**", "url": "https://wpnews.pro/news/echoes-the-ghost-in-your-terminal-haunted-local-ai-companion", "canonical_source": "https://dev.to/ayush_dinda_6b35589d05771/echoes-the-ghost-in-your-terminal-haunted-local-ai-companion-35mj", "published_at": "2026-10-27 04:36:48+00:00", "updated_at": "2026-10-27 04:42:36.601938+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-tools", "large-language-models", "generative-ai"], "entities": ["Echoes", "Hacktoberfest", "SQLite"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/echoes-the-ghost-in-your-terminal-haunted-local-ai-companion", "markdown": "https://wpnews.pro/news/echoes-the-ghost-in-your-terminal-haunted-local-ai-companion.md", "text": "https://wpnews.pro/news/echoes-the-ghost-in-your-terminal-haunted-local-ai-companion.txt", "jsonld": "https://wpnews.pro/news/echoes-the-ghost-in-your-terminal-haunted-local-ai-companion.jsonld"}}