This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
For the final week of Hacktoberfest, I built The Haunted Terminal: Code Spiritāa lightweight, mobile-friendly CLI companion that turns your ordinary shell into a spooky, haunted environment. Whenever you type commands like git push or rm -rf, a restless digital ghost intercepts your workflow, whispering eerie warnings, dramatic lore, and complaints about modern code directly into your terminal.
Code
python
import sys
import time
def print_spooky(text):
for char in text:
sys.stdout.write(char)
sys.stdout.flush()
time.sleep(0.02)
print("\n")
def get_ghost_reaction(command):
cmd_lower = command.strip().lower()
if "rm -rf" in cmd_lower:
print_spooky("š» [GHOST]: * shrieks * Ah, destruction! You wipe files from disk, yet my ancient code remains etched into the void...")
elif "git push" in cmd_lower:
print_spooky("š» [GHOST]: * rattles chains * Pushing code into the cloud... into the digital afterlife where no one can hear you debug.")
elif "python" in cmd_lower or "node" in cmd_lower:
print_spooky("š» [GHOST]: Spinning up a runtime? Another fragile vessel for my restless spirit to inhabit...")
elif "exit" in cmd_lower or "quit" in cmd_lower:
print_spooky("š» [GHOST]: You think you can leave the machine? I live in your RAM now...")
sys.exit()
else:
print_spooky(f"š» [GHOST]: Ah, '{command}'... A curious incantation. But does it appease the machine spirits?")
def main():
print("=" * 50)
print(" THE HAUNTED TERMINAL: Code Spirit v1.0 ")
print(" Type any command, or type 'exit' to flee. ")
print("=" * 50 + "\n")
while True:
try:
user_input = input("haunted-shell$ ")
if user_input.strip():
get_ghost_reaction(user_input)
except KeyboardInterrupt:
print("\nš» [GHOST]: You cannot interrupt the haunting with Ctrl+C...")
break
if __name__ == "__main__":
main()
## How I Built It
I built this entirely on my mobile phone using a clean, single-file Python script. I wanted something fast, creative, and fully functional without needing heavy cloud setups, complex databases, or GitHub storage limits. It works as an interactive command-line shell wrapper that simulates an AI ghost trapped inside your local runtime memory, reacting dynamically to whatever commands you throw at it.
## Why Does Open Innovation Matter?
Open innovation and local-first software mean your tools belong entirely to you. A haunted terminal shouldn't require a heavy, high-latency cloud API connection or leak your private local workspace commands to an external server. Running open logic locally ensures absolute privacy, zero cost, and instant ghostly responses even when the Wi-Fi is completely turned off!
## The Spirit of It
Late-night coding sessions, debugging weird errors, and staring at blinking terminal cursors in the dark can genuinely feel a bit ghostly. This project brings that developer folklore to life, adding a heavy dose of Halloween fun, personality, and eerie atmosphere straight into the command line.
## Prize Categories
Gemma (Designed for local open-weight model integration and edge-AI execution)
Top comments (0)