GhostTrace — A Local AI That Makes Your Terminal Feel Haunted
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built GhostTrace is a local, terminal-based AI companion with a haunted personality. I interpreted Ghost in the Machine as the idea of giving a machine a personality that feels almost alive — something that doesn't just answer questions, but creates an atmosphere around every interaction.…
This submission is for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine. The project, GhostTrace, is a terminal-based AI companion with a haunting personality. Instead of creating another typical AI chatbot, the developer aimed to build an immersive experience where the terminal itself becomes a character.
GhostTrace utilizes a locally running Qwen2.5-1.5B model, which allows the AI to operate independently of cloud-based AI APIs. The application combines local AI inference with various interactive horror-themed features. These features include locally running conversations with the Qwen2.5-1.5B model, persistent memory for storing conversation context through SQLite, haunted keystrokes that create an atmospheric experience, scheduled whispers that trigger ambient audio during idle periods, and a dynamic horror director that coordinates atmospheric effects to prevent predictability.
The project also features an audio engine that handles sound effects and background audio through a dedicated audio subsystem. A command guardian adds a safety layer around potentially sensitive terminal operations. The application is built using Python 3.11, Qwen2.5-1.5B-Instruct as the AI model, llama.cpp for inference, Typer for the terminal interface, SQLite for the database, MiniAudio for audio management, and Pytest for testing.
The main challenge in building GhostTrace was integrating local inference and audio with a responsive terminal interface. Running a language model on a CPU-only laptop required careful management of memory usage, inference latency, threading, and UI responsiveness. The developer aimed to create a project that remains usable on modest hardware, rather than assuming access to a powerful GPU.
Open innovation played a significant role in GhostTrace. By using an open-weight model and local inference, developers have control over their AI applications. This allowed for local execution without sending conversations to third-party generative AI APIs, model ownership, transparency in the inference pipeline and application architecture, and accessibility on consumer hardware.
The open-source approach also enabled experimentation with memory, audio, and terminal tools without being restricted to a conventional chatbot interface.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.