DEV Community

Tommy Lalrinfela
Tommy Lalrinfela

Posted on Edited on

The recycle bin that revives deleted files.

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

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

What I Built

Every operating system has a graveyard: the Recycle Bin. Mine is full of half-finished drafts, broken configs and files named final_v2_REALLY_final. For the "Ghost in the Machine" theme, I took it literally: what if the things you deleted came back to haunt you?

The Bin-Ghoul reads your Recycle Bin (read-only) and turns every deleted file into a tombstone in a spooky web graveyard. Click one, and the ghost of that file speaks, with a two-sentence epitaph about how it was discarded. If the file is a small text or code file, the ghost also gets a short fragment of its contents, so it can complain about something specific that you actually wrote.

It's a Halloween scene made entirely of code: a harvest moon, a haunted manor with flickering windows, bats crossing the sky, swaying grass, drifting embers, the occasional flash of lightning, and tombstones that rise out of the ground when the page loads. Wake a ghost and a wisp floats up from the stone while a candle lights beside it.

Code

GitHub logo DS02X / bin-ghoul

My first hacktober project. Everything is built with claude sonnet 5.5

demo2

The Bin-Ghoul: Echoes from the Recycle Bin

Your Recycle Bin is a graveyard. Bin-Ghoul reads it (read-only), and a small open-weight model running on your own computer writes a ghostly epitaph for every file you threw away. Click a tombstone to wake the spirit.

Built for the "Ghost in the Machine" challenge.

Setup (Windows 11)

  1. Install Python 3.9 or newer from python.org. Tick "Add Python to PATH". Nothing else to install: the project uses only the standard library.
  2. Set up Ollama (open a terminal, such as PowerShell)
    ollama --version
    ollama pull llama3.2:1b
    ollama run llama3.2:1b "say hello like a ghost"
    
    The pull downloads the model once (about 1.3 GB). The run test confirms it works; type /bye to exit. Ollama keeps a background server running at localhost:11434 while its tray icon is active. If it isn't, run ollama serve in a separate terminal.
  3. Run Bin-Ghoul from this folder
    python bin_ghoul.py
    
    …

How I Built It

  • Model: Llama 3.2 1B, an open-weight model, running locally through Ollama. The model can be swapped with one flag (--model qwen2.5:1.5b, for example).

  • Backend: Python, standard library only, so there are no dependencies to install. A small local server on 127.0.0.1 serves the page and talks to Ollama's local API.

  • Reading the bin: On Windows, PowerShell's Shell interface lists each deleted file's original name, original folder, deletion date and size. On Linux and macOS it reads the Trash folder.

  • Prompting: A system prompt turns each file into a dramatic, slightly passive-aggressive spirit. For small text and code files (under 200 KB), the first 400 characters are passed along so the epitaph can reference the content. Each epitaph is generated only when you click, so the page stays instant.

  • Frontend: One self-contained HTML page with no external images, fonts or scripts. Stone is textured with SVG lighting filters, the fog is a WebGL fragment shader (with a CSS fallback), and the grass, trees, bats and manor are drawn procedurally. It respects reduced-motion settings and works with a keyboard.

  • Safety: It never deletes, restores or modifies anything, and it skips binary files and large files.

Why Does Open Innovation Matter?

A Recycle Bin holds the things you were least proud of: unfinished thoughts, private notes, broken code, mistakes. That is exactly the data you should not send to a cloud API.

  • Privacy by design: Because the model's weights are open, file names and contents are processed on my own machine and never leave it. A closed API would have made this project a privacy problem instead of a joke.

  • No cost, no account, works offline: Once the model is pulled there are no API keys, quotas or bills, and it works with the Wi-Fi off.

  • Hackable: The ghost's whole personality is one system prompt, and the model is one flag. Gothic poets, grumpy sysadmins and cheerful motivational ghosts are a one-line change.

It's only possible because small open models are now good enough to be funny on a laptop. A 1B-parameter model isn't perfect (some epitaphs repeat themselves), but it's good enough for a haunting.

Note: The project is nowhere near finished or polished, everything is made with claude sonnet 5.5. If you are interested in this project or if you like it, we can work together to improve it. This is just a rough draft of my vision.

Top comments (0)