This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Meet phantom-cli, a lightweight, cross-platform terminal pranking utility that turns your ordinary shell into a haunted environment.
When you or an unsuspecting friend type routine commands like ls, dir, or cd, the terminal executes its normal tasks without breaking your workflow. Simultaneously, however, it quietly fires an asynchronous request to a cloud-hosted open-weight AI model in the background. Within seconds, an ancient, glitchy "phantom" trapped inside the operating system outputs eerie, personalized commentary reacting directly to the command you ran and the folder you are currently viewing.
Demo
Code
GitHub Repository: phantom-cli
How I Built It
To make phantom-cli accessible to any developer regardless of hardware limitations (since I couldn't run a large model locally on my machine), I designed a zero-dependency, thin-client architecture:
-
Shell Hook Overrides: The project provides dedicated setup scripts (
install.ps1for Windows PowerShell andinstall.shfor Unix/Linux/macOS Bash/Zsh) that safely remove conflicting command aliases and append intelligent wrapper functions into your$PROFILEor~/.bashrc/~/.zshrc. -
Native OS Tooling: No Python, Node.js, or heavy runtimes are required on the host machine. It uses native shell features like PowerShell's
Invoke-RestMethodand Unixcurl. -
Open-Weight AI Integration: It hooks directly into lightning-fast open-weight models (such as
llama-3.3-70b-versatilehosted on Groq) via API, injecting dynamic path and command context into the prompt on the fly. - Pre-Flight Safety Checks: Both installers prompt securely for your API key and verify connection stability before making any modifications to your terminal configuration.
Why Does Open Innovation Matter?
Open innovation was absolute core to making this project work:
- Escaping Corporate Guardrails: Closed commercial AI models come wrapped in heavy enterprise safety filters that immediately panic or refuse to participate if you prompt them to act like a spooky, glitchy machine ghost. Open-weight models gave me total creative freedom over the system prompt to build atmospheric horror and creative developer tools.
- Democratizing AI on Standard Hardware: Because I couldn't run heavy models locally, pairing lightweight client-side shell hooks with cloud-hosted open weights proved that developers on standard, resource-constrained laptops can still build rich, interactive experiences without expensive hardware.
The Spirit of It
Nothing beats testing this on a colleague or friend's machine, watching them type a routine ls or cd to look for a file, and suddenly seeing the terminal talk back to them with cryptic warnings about the directory they are in! It brings a playful, haunted pulse to everyday developer workflows.


Top comments (0)