DEV Community

Cover image for GhostTrace — The Shell Remembers Hacktoberfest 2026 Week 4 cover is ready. 👻.
Cyber
Cyber

Posted on

GhostTrace — The Shell Remembers Hacktoberfest 2026 Week 4 cover is ready. 👻.

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

👻 GhostTrace — The Shell Remembers

GhostTrace is a privacy-first, AI-powered haunted terminal companion that brings a supernatural personality to the command line.

Inspired by the concept of a ghost living inside a computer, I wanted to build something that doesn't just execute commands but also responds to them with its own personality.

Key Features:

  • AI-Powered Whispers: Generates spooky, context-aware commentary based on terminal commands and their outcomes.
  • Local AI Inference: Uses Google's open-weight Gemma 3 4B model through Ollama.
  • Command Safety: Validates commands and blocks potentially dangerous operations before execution.
  • Multiple Ghost Personas: Includes GhostTrace, Spectral Wraith, Cyber Poltergeist, and Crypt Keeper.
  • Haunt.sh Integration: Extends the experience into interactive Bash shells with asynchronous ghost whispers.
  • Offline Fallback: Provides deterministic responses when the local AI model is unavailable.
  • Privacy-First Architecture: Designed to keep AI inference local without depending on cloud AI APIs or cloud telemetry.

The idea is simple: What if your terminal had a ghost living inside it?

Code

GitHub Repository:https://github.com/Suguda-Thakur-Marndi/GhostTrace

The repository includes the Python terminal companion, Bash shell integration, local AI daemon, ghost personas, security controls, automated tests, and documentation.

How I Built It

I built GhostTrace using open-source technologies and locally running AI models.

AI Model:

  • Google Gemma 3 4B through Ollama.
  • Optional llama.cpp provider support for local inference.
  • Deterministic fallback responses for offline operation.

Tech Stack:

  • Python 3.10+
  • Bash
  • Zsh integration
  • Ollama
  • Gemma 3 4B
  • llama.cpp
  • Pytest

Architecture:

The project has two main components:

  1. GhostTrace Python REPL: An interactive terminal companion responsible for command execution, safety validation, local AI integration, and context-aware commentary.

  2. Haunt.sh: A shell integration that hooks into interactive Bash sessions and communicates with a local Python daemon to generate asynchronous ghost whispers without blocking the shell prompt.

Security and privacy are central to the architecture. Commands are validated, sensitive information is redacted, and AI-generated responses are sanitized rather than executed.

The project has also been tested with an automated Python test suite, with 287 tests passing in the latest fully successful run.

Why Does Open Innovation Matter?

Open innovation made GhostTrace possible.

Using open-weight models gives developers the freedom to run AI locally, customize model behavior, experiment with different models, and build applications without depending entirely on proprietary cloud APIs.

For GhostTrace, this is particularly important because terminal interactions can contain sensitive information. Local inference helps keep that processing under the user's control.

Open-source development also allows contributors to inspect the implementation, audit security mechanisms, create new ghost personas, improve the command safety system, and extend the project.

GhostTrace demonstrates how open-source AI can make developer tools more creative, accessible, customizable, and privacy-conscious.

My Agent Session

Optional: [Add your DevRelay agent session link here]

The Spirit of It

Imagine opening your terminal late at night.

You type:

whoami

The command executes successfully.

Then, somewhere inside the machine, a voice responds:

"Another presence has entered this system. I remember you."

That is the experience I wanted to create.

I wanted to combine practical developer tooling with a little mystery, nostalgia, and supernatural personality.

A terminal that feels alive. A machine that responds. A ghost that never sleeps.

The shell remembers. The ghost never sleeps. 👻

Prize Categories

Featured Category

  • Gemma — Best Use of Gemma ($200): Uses Google's open-weight Gemma 3 4B model through Ollama for locally generated, context-aware terminal commentary and privacy-focused AI interactions.

Top comments (0)